{"id":31120883,"url":"https://github.com/avadim483/fast-excel-reader","last_synced_at":"2025-09-17T15:05:27.907Z","repository":{"id":41123319,"uuid":"314370702","full_name":"aVadim483/fast-excel-reader","owner":"aVadim483","description":"Lightwight and very fast XLSX Excel Spreadsheet Reader in PHP","archived":false,"fork":false,"pushed_at":"2025-06-01T15:09:12.000Z","size":6598,"stargazers_count":93,"open_issues_count":0,"forks_count":20,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-16T01:57:49.014Z","etag":null,"topics":["excel","excelparser","excelreader","import","parser","php","php-library","reader","spreadsheets","xlsx"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aVadim483.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-19T21:09:49.000Z","updated_at":"2025-07-23T13:10:32.000Z","dependencies_parsed_at":"2023-10-18T17:33:18.274Z","dependency_job_id":"69d257d8-979b-4e09-8b23-795eff4eb3aa","html_url":"https://github.com/aVadim483/fast-excel-reader","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"3349e26e76d9cdc53fb4bc0a72ce06e1e26a2f36"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/aVadim483/fast-excel-reader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aVadim483%2Ffast-excel-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aVadim483%2Ffast-excel-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aVadim483%2Ffast-excel-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aVadim483%2Ffast-excel-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aVadim483","download_url":"https://codeload.github.com/aVadim483/fast-excel-reader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aVadim483%2Ffast-excel-reader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275615279,"owners_count":25496811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["excel","excelparser","excelreader","import","parser","php","php-library","reader","spreadsheets","xlsx"],"created_at":"2025-09-17T15:05:25.545Z","updated_at":"2025-09-17T15:05:27.897Z","avatar_url":"https://github.com/aVadim483.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub Release](https://img.shields.io/github/v/release/aVadim483/fast-excel-reader)](https://packagist.org/packages/avadim/fast-excel-reader)\n[![Packagist Downloads](https://img.shields.io/packagist/dt/avadim/fast-excel-reader?color=%23aa00aa)](https://packagist.org/packages/avadim/fast-excel-reader)\n[![GitHub License](https://img.shields.io/github/license/aVadim483/fast-excel-reader)](https://packagist.org/packages/avadim/fast-excel-reader)\n[![Static Badge](https://img.shields.io/badge/php-%3E%3D7.4-005fc7)](https://packagist.org/packages/avadim/fast-excel-reader)\n\n# FastExcelReader\n\n**FastExcelReader** is a part of the FastExcelPhp Project which consists of\n\n* [FastExcelWriter](https://packagist.org/packages/avadim/fast-excel-writer) - to create Excel spreadsheets\n* [FastExcelReader](https://packagist.org/packages/avadim/fast-excel-reader) - to reader Excel spreadsheets\n* [FastExcelTemplator](https://packagist.org/packages/avadim/fast-excel-templator) - to generate Excel spreadsheets from XLSX templates\n* [FastExcelLaravel](https://packagist.org/packages/avadim/fast-excel-laravel) - special **Laravel** edition\n\n## Introduction\n\nThis library is designed to be lightweight, super-fast and requires minimal memory usage.\n\n**FastExcelReader** can read Excel compatible spreadsheets in XLSX format (Office 2007+).\nIt only reads data, but it does it very quickly and with minimal memory usage.\n\n**Features**\n\n* Supports XLSX format only (Office 2007+) with multiple worksheets\n* Supports autodetect currency/numeric/date types\n* Supports auto formatter and custom formatter of datetime values\n* The library can define and extract images from XLSX files\n* The library can read styling options of cells - formatting patterns, colors, borders, fonts, etc.\n\n## Installation\n\nUse `composer` to install **FastExcelReader** into your project:\n\n```\ncomposer require avadim/fast-excel-reader\n```\n\nJump to:\n* [Simple example](#simple-example)\n* [Read values row by row in loop](#read-values-row-by-row-in-loop)\n* [Keys in resulting arrays](#keys-in-resulting-arrays)\n* [Empty cells \u0026 rows](#empty-cells--rows)\n* [Advanced example](#advanced-example)\n* [Date Formatter](#date-formatter)\n* [Images functions](#images-functions)\n* [Cell value types](#cell-value-types)\n* [How to get complete info about the cell style](#how-to-get-complete-info-about-the-cell-style)\n* [Retrieve data validation rules](#retrieve-data-validation-rules)\n* [Column Widths](#column-widths)\n* [Row Heights](#row-heights)\n* [Freeze Pane Info](#freeze-pane-info)\n* [Tab Color Info](#tab-color-info)\n* [Info about merged cells](#info-about-merged-cells)\n* [Some useful methods](#some-useful-methods)\n\n## Usage\n\nYou can find more examples in */demo* folder\n\n### Simple example\n![demo file](demo/files/img1.jpg)\n```php\nuse \\avadim\\FastExcelReader\\Excel;\n\n$file = __DIR__ . '/files/demo-00-simple.xlsx';\n\n// Open XLSX-file\n$excel = Excel::open($file);\n// Read all values as a flat array from current sheet\n$result = $excel-\u003ereadCells();\n```\nYou will get this array:\n```text\nArray\n(\n    [A1] =\u003e 'col1'\n    [B1] =\u003e 'col2'\n    [A2] =\u003e 111\n    [B2] =\u003e 'aaa'\n    [A3] =\u003e 222\n    [B3] =\u003e 'bbb'\n)\n```\n\n```php\n// Read all rows in two-dimensional array (ROW x COL)\n$result = $excel-\u003ereadRows();\n```\nYou will get this array:\n```text\nArray\n(\n    [1] =\u003e Array\n        (\n            ['A'] =\u003e 'col1'\n            ['B'] =\u003e 'col2'\n        )\n    [2] =\u003e Array\n        (\n            ['A'] =\u003e 111\n            ['B'] =\u003e 'aaa'\n        )\n    [3] =\u003e Array\n        (\n            ['A'] =\u003e 222\n            ['B'] =\u003e 'bbb'\n        )\n)\n```\n\n```php\n// Read all columns in two-dimensional array (COL x ROW)\n$result = $excel-\u003ereadColumns();\n```\nYou will get this array:\n```text\nArray\n(\n    [A] =\u003e Array\n        (\n            [1] =\u003e 'col1'\n            [2] =\u003e 111\n            [3] =\u003e 222\n        )\n\n    [B] =\u003e Array\n        (\n            [1] =\u003e 'col2'\n            [2] =\u003e 'aaa'\n            [3] =\u003e 'bbb'\n        )\n\n)\n```\n\n### Read values row by row in loop\n```php\n$sheet = $excel-\u003esheet();\nforeach ($sheet-\u003enextRow() as $rowNum =\u003e $rowData) {\n    // $rowData is array ['A' =\u003e ..., 'B' =\u003e ...]\n    $addr = 'C' . $rowNum;\n    if ($sheet-\u003ehasImage($addr)) {\n        $sheet-\u003esaveImageTo($addr, $fullDirectoryPath);\n    }\n    // handling of $rowData here\n    // ...\n}\n\n// OR\nforeach ($sheet-\u003enextRow() as $rowNum =\u003e $rowData) {\n    // handling of $rowData here\n    // ...\n    // get image list from current row\n    $imageList = $sheet-\u003egetImageListByRow();\n    foreach ($imageList as $imageInfo) {\n        $imageBlob = $sheet-\u003egetImageBlob($imageInfo['address']);\n    }\n}\n\n// OR\nforeach ($sheet-\u003enextRow(['A' =\u003e 'One', 'B' =\u003e 'Two'], Excel::KEYS_FIRST_ROW) as $rowNum =\u003e $rowData) {\n    // $rowData is array ['One' =\u003e ..., 'Two' =\u003e ...]\n    // ...\n}\n```\nNOTE: Every time you call the ```foreach ($sheet-\u003enextRow() as $rowIndex =\u003e $row)``` loop, \nreading data starts from the first row.\n\nBut there is an alternative way to read row by row - using the readNextRow() method. \nIn this case, you first need to call the ```$sheet-\u003ereset(...)``` method with the required reading parameters, \nand then you can call `````$sheet-readNextRow()`````. If at some point you need to start reading data from the beginning, \nyou need to call ```$sheet-\u003ereset(...)``` again.\n\n```php\n// Init the internal read generator\n$sheet-\u003ereset(['A' =\u003e 'One', 'B' =\u003e 'Two'], Excel::KEYS_FIRST_ROW);\n\n// read the first row\n$rowData = $sheet-\u003ereadNextRow();\nvar_dump($rowData);\n\n// Read the next 3 rows\nfor ($i = 0; $i \u003c 3; $i++) {\n    $rowData = $sheet-\u003ereadNextRow();\n    var_dump($rowData);\n}\n\n// Reset the internal generator and read all rows starting from the first one\n$sheet-\u003ereset(['A' =\u003e 'One', 'B' =\u003e 'Two'], Excel::KEYS_FIRST_ROW);\n$result = [];\nwhile ($rowData = $sheet-\u003ereadNextRow()) {\n    $result[] = $rowData;\n}\nvar_dump($result);\n```\n\n### Keys in resulting arrays\n```php\n// Read rows and use the first row as column keys\n$result = $excel-\u003ereadRows(true);\n```\nYou will get this result:\n```text\nArray\n(\n    [2] =\u003e Array\n        (\n            ['col1'] =\u003e 111\n            ['col2'] =\u003e 'aaa'\n        )\n    [3] =\u003e Array\n        (\n            ['col1'] =\u003e 222\n            ['col2'] =\u003e 'bbb'\n        )\n)\n```\nThe optional second argument specifies the result array keys\n```php\n\n// Rows and cols start from zero\n$result = $excel-\u003ereadRows(false, Excel::KEYS_ZERO_BASED);\n```\nYou will get this result:\n```text\nArray\n(\n    [0] =\u003e Array\n        (\n            [0] =\u003e 'col1'\n            [1] =\u003e 'col2'\n        )\n    [1] =\u003e Array\n        (\n            [0] =\u003e 111\n            [1] =\u003e 'aaa'\n        )\n    [2] =\u003e Array\n        (\n            [0] =\u003e 222\n            [1] =\u003e 'bbb'\n        )\n)\n```\nAllowed values of result mode\n\n| mode options        | descriptions                                                                    |\n|---------------------|---------------------------------------------------------------------------------|\n| KEYS_ORIGINAL       | rows from '1', columns from 'A' (default)                                       |\n| KEYS_ROW_ZERO_BASED | rows from 0                                                                     |\n| KEYS_COL_ZERO_BASED | columns from 0                                                                  |\n| KEYS_ZERO_BASED     | rows from 0, columns from 0 (same as KEYS_ROW_ZERO_BASED + KEYS_COL_ZERO_BASED) |\n| KEYS_ROW_ONE_BASED  | rows from 1                                                                     |\n| KEYS_COL_ONE_BASED  | columns from 1                                                                  |\n| KEYS_ONE_BASED      | rows from 1, columns from 1 (same as KEYS_ROW_ONE_BASED + KEYS_COL_ONE_BASED)   |\n\nAdditional options that can be combined with result modes\n\n| options         | descriptions                                 |\n|-----------------|----------------------------------------------|\n| KEYS_FIRST_ROW  | the same as _true_ in the first argument     |\n| KEYS_RELATIVE   | index from top left cell of area (not sheet) |\n| KEYS_SWAP       | swap rows and columns                        |\n\nFor example\n```php\n\n$result = $excel-\u003ereadRows(['A' =\u003e 'bee', 'B' =\u003e 'honey'], Excel::KEYS_FIRST_ROW | Excel::KEYS_ROW_ZERO_BASED);\n```\nYou will get this result:\n```text\nArray\n(\n    [0] =\u003e Array\n        (\n            [bee] =\u003e 111\n            [honey] =\u003e 'aaa'\n        )\n\n    [1] =\u003e Array\n        (\n            [bee] =\u003e 222\n            [honey] =\u003e 'bbb'\n        )\n\n)\n```\n\n### Empty cells \u0026 rows\n\nThe library already skips empty cells and empty rows by default. Empty cells are cells where nothing is written, \nand empty rows are rows where all cells are empty. If a cell contains an empty string, it is not considered empty. \nBut you can change this behavior and skip cells with empty strings.\n\n```php\n$sheet = $excel-\u003esheet();\n\n// Skip empty cells and empty rows\nforeach ($sheet-\u003enextRow() as $rowNum =\u003e $rowData) {\n    // handle $rowData\n}\n\n// Skip empty cells and cells with empty strings\nforeach ($sheet-\u003enextRow([], Excel::TREAT_EMPTY_STRING_AS_EMPTY_CELL) as $rowNum =\u003e $rowData) {\n    // handle $rowData\n}\n\n// Skip empty cells and empty rows (rows containing only whitespace characters are also considered empty)\nforeach ($sheet-\u003enextRow([], Excel::TRIM_STRINGS | Excel::TREAT_EMPTY_STRING_AS_EMPTY_CELL) as $rowNum =\u003e $rowData) {\n    // handle $rowData\n}\n```\nOther way\n```php\n$sheet-\u003ereset([], Excel::TRIM_STRINGS | Excel::TREAT_EMPTY_STRING_AS_EMPTY_CELL);\n$rowData = $sheet-\u003ereadNextRow();\n// do something\n\n$rowData = $sheet-\u003ereadNextRow();\n// handle next row\n\n// ...\n```\n\n\n### Advanced example\n```php\nuse \\avadim\\FastExcelReader\\Excel;\n\n$file = __DIR__ . '/files/demo-02-advanced.xlsx';\n\n$excel = Excel::open($file);\n\n$result = [\n    'sheets' =\u003e $excel-\u003egetSheetNames() // get all sheet names\n];\n\n$result['#1'] = $excel\n    // select sheet by name\n    -\u003eselectSheet('Demo1') \n    // select area with data where the first row contains column keys\n    -\u003esetReadArea('B4:D11', true)  \n    // set date format\n    -\u003esetDateFormat('Y-m-d') \n    // set key for column 'C' to 'Birthday'\n    -\u003ereadRows(['C' =\u003e 'Birthday']); \n\n// read other arrays with custom column keys\n// and in this case we define range by columns only\n$columnKeys = ['B' =\u003e 'year', 'C' =\u003e 'value1', 'D' =\u003e 'value2'];\n$result['#2'] = $excel\n    -\u003eselectSheet('Demo2', 'B:D')\n    -\u003ereadRows($columnKeys);\n\n$result['#3'] = $excel\n    -\u003esetReadArea('F5:H13')\n    -\u003ereadRows($columnKeys);\n```\nYou can set read area by defined names in workbook. For example if workbook has defined name **Headers** with range **Demo1!$B$4:$D$4**\nthen you can read cells by this name\n\n```php\n$excel-\u003esetReadArea('Values');\n$cells = $excel-\u003ereadCells();\n```\nNote that since the value contains the sheet name, this sheet becomes the default sheet.\n\nYou can set read area in the sheet\n```php\n$sheet = $excel-\u003egetSheet('Demo1')-\u003esetReadArea('Headers');\n$cells = $sheet-\u003ereadCells();\n```\nBut if you try to use this name on another sheet, you will get an error\n```php\n$sheet = $excel-\u003egetSheet('Demo2')-\u003esetReadArea('Headers');\n// Exception: Wrong address or range \"Values\"\n\n```\n\nIf necessary, you can fully control the reading process using the method ```readSheetCallback()``` with callback-function\n```php\nuse \\avadim\\FastExcelReader\\Excel;\n\n$excel = Excel::open($file);\n\n$result = [];\n$excel-\u003ereadCallback(function ($row, $col, $val) use(\u0026$result) {\n    // Any manipulation here\n    $result[$row][$col] = (string)$val;\n\n    // if the function returns true then data reading is interrupted  \n    return false;\n});\nvar_dump($result);\n```\n\n### Date Formatter\nBy default, all datetime values returns as timestamp. But you can change this behavior using ```dateFormatter()```\n\n![demo date](demo/files/img2.jpg)\n```php\n$excel = Excel::open($file);\n$sheet = $excel-\u003esheet()-\u003esetReadArea('B5:D7');\n$cells = $sheet-\u003ereadCells();\necho $cells['C5']; // -2205187200\n\n// If argument TRUE is passed, then all dates will be formatted as specified in cell styles\n// IMPORTANT! The datetime format depends on the locale\n$excel-\u003edateFormatter(true);\n$cells = $sheet-\u003ereadCells();\necho $cells['C5']; // '14.02.1900'\n\n// You can specify date format pattern\n$excel-\u003edateFormatter('Y-m-d');\n$cells = $sheet-\u003ereadCells();\necho $cells['C5']; // '1900-02-14'\n\n// set date formatter function\n$excel-\u003edateFormatter(fn($value) =\u003e gmdate('m/d/Y', $value));\n$cells = $sheet-\u003ereadCells();\necho $cells['C5']; // '02/14/1900'\n\n// returns DateTime instance\n$excel-\u003edateFormatter(fn($value) =\u003e (new \\DateTime())-\u003esetTimestamp($value));\n$cells = $sheet-\u003ereadCells();\necho get_class($cells['C5']); // 'DateTime'\n\n// custom manipulations with datetime values\n$excel-\u003edateFormatter(function($value, $format, $styleIdx) use($excel) {\n    // get Excel format of the cell, e.g. '[$-F400]h:mm:ss\\ AM/PM'\n    $excelFormat = $excel-\u003egetFormatPattern($styleIdx);\n\n    // get format converted for use in php functions date(), gmdate(), etc\n    // for example the Excel pattern above would be converted to 'g:i:s A'\n    $phpFormat = $excel-\u003egetDateFormatPattern($styleIdx);\n    \n    // and if you need you can get value of numFmtId for this cell\n    $style = $excel-\u003egetCompleteStyleByIdx($styleIdx, true);\n    $numFmtId = $style['format-num-id'];\n    \n    // do something and write to $result\n    $result = gmdate($phpFormat, $value);\n\n    return $result;\n});\n```\nSometimes, if a cell's format is specified as a date but does not contain a date, the library may misinterpret this value. To avoid this, you can disable date formatting\n\n![demo date](demo/files/img3.jpg)\n\nHere, cell B1 contains the string \"3.2\" and cell B2 contains the date 2024-02-03, but both cells are set to the date format\n\n```php\n$excel = Excel::open($file);\n// default mode\n$cells = $sheet-\u003ereadCells();\necho $cell['B1']; // -2208798720 - the library tries to interpret the number 3.2 as a timestamp\necho $cell['B2']; // 1706918400 - timestamp of 2024-02-03\n\n// date formatter is on\n$excel-\u003edateFormatter(true);\n$cells = $sheet-\u003ereadCells();\necho $cell['B1']; // '03.01.1900'\necho $cell['B2']; // '3.2'\n\n// date formatter is off\n$excel-\u003edateFormatter(false);\n$cells = $sheet-\u003ereadCells();\necho $cell['B1']; // '3.2'\necho $cell['B2']; // 1706918400 - timestamp of 2024-02-03\n\n```\n\n### Images functions\n```php\n// Returns count images on all sheets\n$excel-\u003ecountImages();\n\n// Returns count images on sheet\n$sheet-\u003ecountImages();\n\n// Returns image list of sheet\n$sheet-\u003egetImageList();\n\n// Returns image list of specified row\n$sheet-\u003egetImageListByRow($rowNumber);\n\n// Returns TRUE if the specified cell has an image\n$sheet-\u003ehasImage($cellAddress);\n\n// Returns mime type of image in the specified cell (or NULL)\n$sheet-\u003egetImageMimeType($cellAddress);\n\n// Returns inner name of image in the specified cell (or NULL)\n$sheet-\u003egetImageName($cellAddress);\n\n// Returns an image from the cell as a blob (if exists) or NULL\n$sheet-\u003egetImageBlob($cellAddress);\n\n// Writes an image from the cell to the specified filename\n$sheet-\u003esaveImage($cellAddress, $fullFilenamePath);\n\n// Writes an image from the cell to the specified directory\n$sheet-\u003esaveImageTo($cellAddress, $fullDirectoryPath);\n```\n\n## Cell value types\n\nThe library tries to determine the types of cell values, and in most cases it does it right. \nTherefore, you get numeric or string values. Date values are returned as a timestamp by default.\nBut you can change this behavior by setting the date format (see the formatting options for the date() php function).\n\n```php\n$excel = Excel::open($file);\n$result = $excel-\u003ereadCells();\nprint_r($result);\n```\nThe above example will output:\n```text\nArray\n(\n    [B2] =\u003e -2205187200\n    [B3] =\u003e 6614697600\n    [B4] =\u003e -6845212800\n)\n```\n```php\n$excel = Excel::open($file);\n$excel-\u003esetDateFormat('Y-m-d');\n$result = $excel-\u003ereadCells();\nprint_r($result);\n```\nThe above example will output:\n```text\nArray\n(\n    [B2] =\u003e '1900-02-14'\n    [B3] =\u003e '2179-08-12'\n    [B4] =\u003e '1753-01-31'\n)\n```\n\n## How to get complete info about the cell style\n\nUsually read functions return just cell values, but you can read the values with styles.\nIn this case, for each cell, not a scalar value will be returned, but an array \nlike ['v' =\u003e _scalar_value_, 's' =\u003e _style_array_, 'f' =\u003e _formula_]\n\n```php\n$excel = Excel::open($file);\n\n$sheet = $excel-\u003esheet();\n\n$rows = $sheet-\u003ereadRowsWithStyles();\n$columns = $sheet-\u003ereadColumnsWithStyles();\n$cells = $sheet-\u003ereadCellsWithStyles();\n\n$cells = $sheet-\u003ereadCellsWithStyles();\n```\nOr you can read styles only (without values)\n```php\n$cells = $sheet-\u003ereadCellStyles();\n/*\narray (\n  'format' =\u003e \n  array (\n    'format-num-id' =\u003e 0,\n    'format-pattern' =\u003e 'General',\n  ),\n  'font' =\u003e \n  array (\n    'font-size' =\u003e '10',\n    'font-name' =\u003e 'Arial',\n    'font-family' =\u003e '2',\n    'font-charset' =\u003e '1',\n  ),\n  'fill' =\u003e \n  array (\n    'fill-pattern' =\u003e 'solid',\n    'fill-color' =\u003e '#9FC63C',\n  ),\n  'border' =\u003e \n  array (\n    'border-left-style' =\u003e NULL,\n    'border-right-style' =\u003e NULL,\n    'border-top-style' =\u003e NULL,\n    'border-bottom-style' =\u003e NULL,\n    'border-diagonal-style' =\u003e NULL,\n  ),\n)\n */\n$cells = $sheet-\u003ereadCellStyles(true);\n/*\narray (\n  'format-num-id' =\u003e 0,\n  'format-pattern' =\u003e 'General',\n  'font-size' =\u003e '10',\n  'font-name' =\u003e 'Arial',\n  'font-family' =\u003e '2',\n  'font-charset' =\u003e '1',\n  'fill-pattern' =\u003e 'solid',\n  'fill-color' =\u003e '#9FC63C',\n  'border-left-style' =\u003e NULL,\n  'border-right-style' =\u003e NULL,\n  'border-top-style' =\u003e NULL,\n  'border-bottom-style' =\u003e NULL,\n  'border-diagonal-style' =\u003e NULL,\n)\n */\n```\nBut we do not recommend using these methods with large files\n\n## Retrieve data validation rules\nEvery sheet in your XLSX file can contain a set of data validation rules. To retrieve them, you can imply call `getDataValidations` on your sheet\n\n```php\n$excel = Excel::open($file);\n\n$sheet = $excel-\u003esheet();\n\n$validations = $sheet-\u003egetDataValidations();\n/*\n[\n  [\n    'type' =\u003e 'list',\n    'sqref' =\u003e 'E2:E527',\n    'formula1' =\u003e '\"Berlin,Cape Town,Mexico City,Moscow,Sydney,Tokyo\"',\n    'formula2' =\u003e null, \n  ], [\n    'type' =\u003e 'decimal',\n    'sqref' =\u003e 'G2:G527',\n    'formula1' =\u003e '0.0',\n    'formula2' =\u003e '999999.0',\n  ],\n]\n*/\n```\n\n## Column Widths\nRetrieve the width of a specific column in a sheet:\n\n```php\n$excel = Excel::open($file);\n$sheet = $excel-\u003eselectSheet('SheetName');\n\n// Get the width of column 1 (column 'A')\n$columnWidth = $sheet-\u003egetColumnWidth(1);\n\necho $columnWidth; // Example: 11.85\n```\n\n## Row Heights\nRetrieve the height of a specific row in a sheet:\n\n```php\n$excel = Excel::open($file);\n$sheet = $excel-\u003eselectSheet('SheetName');\n\n// Get the height of row 1\n$rowHeight = $sheet-\u003egetRowHeight(1);\n\necho $rowHeight; // Example: 15\n```\n\n## Freeze Pane Info\nRetrieve the freeze pane info for a sheet:\n\n```php\n$excel = Excel::open($file);\n$sheet = $excel-\u003eselectSheet('SheetName');\n\n// Get the freeze pane configuration\n$freezePaneConfig = $sheet-\u003egetFreezePaneInfo();\n\nprint_r($freezePaneConfig);\n/*\nExample Output:\nArray\n(\n    [xSplit] =\u003e 0\n    [ySplit] =\u003e 1\n    [topLeftCell] =\u003e 'A2'\n)\n*/\n```\n\n## Tab Color Info\nRetrieve the tab color info for a sheet:\n\n```php\nCopy code\n$excel = Excel::open($file);\n$sheet = $excel-\u003eselectSheet('SheetName');\n\n// Get the tab color configuration\n$tabColorConfig = $sheet-\u003egetTabColorInfo();\n\nprint_r($tabColorConfig);\n/*\nExample Output:\nArray\n(\n    [theme] =\u003e '2'\n    [tint] =\u003e '-0.499984740745262'\n)\n*/\n```\n\n## Info about merged cells\n\nYou can use the following methods:\n\n* ```Sheet::getMergedCells()``` -- Returns all merged ranges\n* ```Sheet::isMerged(string $cellAddress)``` -- Checks if a cell is merged\n* ```Sheet::mergedRange(string $cellAddress)``` -- Returns merge range of specified cell\n\nFor example\n```php\nif ($sheet-\u003eisMerged('B3')) {\n    $range = $sheet-\u003emergedRange('B3');\n}\n```\n\n## Count rows and columns\n\nEach sheet contains the ```dimension``` property with the range of the area in which the data is written. \nIf only one cell is filled on the sheet, then there should be an address of only this cell of the form \"B2\", \notherwise it is a range of the form \"B2:E10\".\n\nThere are several methods that get data from this property:\n* ```dimension()``` -- Returns dimension of default work area from sheet properties\n* ```countRows()``` -- Count rows from dimension\n* ```countColumns()``` -- Count columns from dimension\n* ```minRow()``` -- The minimal row number from sheet properties\n* ```maxRows()``` -- The maximal row number from sheet properties\n* ```minColumn()``` -- The minimal column letter from sheet properties\n* ```maxColumn()``` -- The maximal column letter from sheet properties\n\nBut sometimes the ```dimension``` property contains incorrect information. \nFor example, it may contain the address of only the first cell of the data range or the address of only the last cell. \nIn such cases, you can use methods that scan the entire sheet and count the actual number of rows and columns with data on the sheet.\n\nIMPORTANT: these methods are slower than methods using the ```dimension``` property\n\n* ```actualDimension()``` -- Returns dimension of the actual work area\n* ```countActualRows()``` -- Count actual rows from the sheet\n* ```minActualRow()``` -- The minimal actual row number\n* ```maxActualRow()``` -- The maximal actual row number\n* ```countActualColumns()``` -- Count actual columns from the sheet\n* ```minActualColumn()``` -- The minimal actual column letter\n* ```maxActualColumn()``` -- The maximal actual column letter\n\n## Some useful methods\n### Excel object\n* ```getSheetNames()``` -- Returns names array of all sheets\n* ```sheet(?string $name = null)``` -- Returns default or specified sheet\n* ```getSheet(string $name, ?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Get sheet by name\n* ```getSheetById(int $sheetId, ?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Get sheet by id\n* ```getFirstSheet(?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Get the first sheet\n* ```selectSheet(string $name, ?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Select default sheet by name and returns it\n* ```selectSheetById(int $sheetId, ?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Select default sheet by id and returns it\n* ```selectFirstSheet(?string $areaRange = null, ?bool $firstRowKeys = false)``` -- Select the first sheet as default and returns it\n* ```getDefinedNames()``` -- Returns defined names of workbook\n\n### Sheet object\n* ```name()``` -- Returns name of string\n* ```isActive()``` -- Active worksheet\n* ```isHidden()``` -- If worksheet is hidden\n* ```isVisible()``` -- If worksheet is visible\n* ```state()``` -- Returns string state of worksheet (used in ```isHidden()``` and ```isVisible()```)\n* ```maxColumn()``` -- The maximal column letter from sheet properties\n* ```firstRow()``` -- The actual number of the first row from the sheet data area (may not match the value from ```minRow()```)\n* ```firstCol()``` -- The actual letter of the first column from the sheet data area (may not match the value from ```minColumn()```)\n* ```readFirstRow()``` -- Returns values of cells of 1st row as array\n* ```readFirstRowWithStyles()``` -- Returns values and styles of cells of 1st row as array\n* ```getColumnWidth(int)``` -- Returns the width of a given column number\n* ```getFreezePaneConfig()``` -- Returns an array containing freeze pane configuration\n* ```getTabColorConfiguration()``` -- Returns an array containing tab color configuration\n\n## Do you want to support FastExcelReader?\n\nif you find this package useful you can give me a star on GitHub.\n\nOr you can donate me :)\n* USDT (TRC20) TSsUFvJehQBJCKeYgNNR1cpswY6JZnbZK7\n* USDT (ERC20) 0x5244519D65035aF868a010C2f68a086F473FC82b\n* ETH 0x5244519D65035aF868a010C2f68a086F473FC82b","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favadim483%2Ffast-excel-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favadim483%2Ffast-excel-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favadim483%2Ffast-excel-reader/lists"}