{"id":16488595,"url":"https://github.com/humhei/excelprocesser","last_synced_at":"2026-02-04T00:39:07.765Z","repository":{"id":141214336,"uuid":"112999908","full_name":"humhei/ExcelProcesser","owner":"humhei","description":"Parse excel file with combinator","archived":false,"fork":false,"pushed_at":"2024-12-29T06:15:24.000Z","size":10396,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T16:52:50.672Z","etag":null,"topics":["combinator","excel","fparsec","fsharp"],"latest_commit_sha":null,"homepage":"","language":"F#","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/humhei.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}},"created_at":"2017-12-04T05:42:59.000Z","updated_at":"2019-05-16T01:49:34.000Z","dependencies_parsed_at":"2023-12-08T07:26:20.004Z","dependency_job_id":"d1245705-7b63-4daa-8d3f-0123343a67d7","html_url":"https://github.com/humhei/ExcelProcesser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humhei%2FExcelProcesser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humhei%2FExcelProcesser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humhei%2FExcelProcesser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humhei%2FExcelProcesser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humhei","download_url":"https://codeload.github.com/humhei/ExcelProcesser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252046012,"owners_count":21685932,"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","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":["combinator","excel","fparsec","fsharp"],"created_at":"2024-10-11T13:39:19.566Z","updated_at":"2026-02-04T00:39:07.717Z","avatar_url":"https://github.com/humhei.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExcelProcesser\nParse excel file with combinator\n\nStable | Prerelease\n--- | ---\n[![NuGet Badge](https://buildstats.info/nuget/ExcelProcesser)](https://www.nuget.org/packages/ExcelProcesser/) | [![NuGet Badge](https://buildstats.info/nuget/ExcelProcesser?includePreReleases=true)](https://www.nuget.org/packages/ExcelProcesser/)\n\n\nMacOS/Linux | Windows\n--- | ---\n[![CircleCI](https://circleci.com/gh/humhei/ExcelProcesser.svg?style=svg)](https://circleci.com/gh/humhei/ExcelProcesser) | [![Build status](https://ci.appveyor.com/api/projects/status/0qnls95ohaytucsi?svg=true)](https://ci.appveyor.com/project/ts2fable-imports/fpublisher)\n[![Build History](https://buildstats.info/circleci/chart/humhei/ExcelProcesser)](https://circleci.com/gh/humhei/ExcelProcesser) | [![Build History](https://buildstats.info/appveyor/chart/ts2fable-imports/fpublisher)](https://ci.appveyor.com/project/ts2fable-imports/fpublisher)\n\n---\n\n## Usage\n * Test file can be found in directory ExcelProcesser.Tests\n * Following code can be found in directory ExcelProcesser.Tests too\n### Parse Cells With Predicate\nmatch cells beginning with GD\n![image](https://github.com/humhei/Resources/blob/Resources/Untitled.png)\n```fsharp\nopen ExcelProcess\nopen CellParsers\nopen System.Drawing\nopen ArrayParsers\n\nlet parser:ArrayParser=\n    !@pRegex(\"GD.*\")\nlet workSheet= \"test.xlsx\"\n            |\u003eExcel.getWorksheetByIndex 1\nlet reply=\n    workSheet\n    |\u003eArrayParser.run parser\n    |\u003efun c-\u003ec.userRange\n    |\u003eSeq.map(fun c-\u003ec.Address)\n    |\u003eList.ofSeq\nmatch reply with\n  |[\"D2\";\"D4\";\"D11\";\"D13\"]-\u003epass()\n  |_-\u003efail()\n```\n### Parse Cells With (Predicates Linked By AND)\nmatch cells of which text begins with GD,\nand of which background color is yellow\n```fsharp\nlet parser:ArrayParser=\n    !@(pRegex(\"GD.*\") \u003c\u0026\u003e pBkColor Color.Yellow)\n```\n### Parse Cells In Sequence\nmatch cells of which text begins with GD,\nand of which right cell's font color is blue\n```fsharp\nlet parser:ArrayParser=\n     !@pRegex(\"GD.*\") +\u003e\u003e+ !@(pFontColor Color.Blue)\n```\nBelow operators are similiar\n\n| Exprocessor  | FParsec |\n| :-------------: | :-------------: |\n| +\u003e\u003e+ | .\u003e\u003e. |\n| +\u003e\u003e | .\u003e\u003e |\n| \u003e\u003e+ | \u003e\u003e. |\n\n\n### Parse Cells in multi rows\nIf operator prefix with `^`.\neg. `^+\u003e\u003e+`\nThis means it is used to parse multiple rows\n\nSample:\nmatch cells of which text begins with GD,\nand to which Second perpendicular of which text begins with GD\n```fsharp\n        let parser:ArrayParser=\n            !@pRegex(\"GD.*\")\n            ^\u003e\u003e+ yPlaceholder 1\n            ^\u003e\u003e+ !@pRegex(\"GD.*\")\n```\n### Parse with many operator\nMatch cells whose left item beigin with STYLE\nand whose text begin with number\nThen batch the result as ExcelRange eg. \"B18:E18\"\n```fsharp\n    let parser:ArrayParser=\n        let sizeParser = !@pFParsec(pint32.\u003e\u003epchar '#') |\u003e xlMany\n        !@pRegex(\"STYLE.*\") \u003e\u003e+ sizeParser\n\n    let reply=\n        workSheet\n        |\u003e ArrayParser.run parser\n        |\u003efun c-\u003ec.userRange\n        |\u003eSeq.map(fun c-\u003ec.Address)\n        |\u003eList.ofSeq\n\n    match reply with\n        |[\"B18:E18\"]-\u003epass()\n        |_-\u003efail()\n```\n### Parse with xUntil operator\n```fsharp\n    let parser:ArrayParser=\n        !@ (pText ((=) \"Begin\")) +\u003e\u003e xUntil (fun _ -\u003e true) !@ (pText ((=) \"Until\"))\n\n    let shift= workSheet\n               |\u003erunArrayParser parser\n               |\u003efun c-\u003ec.xShifts\n\n    match shift with\n    |[4] -\u003epass()\n    |_-\u003efail()\n```\n### Parse with yUntil operator\n```fsharp\n    let parser:ArrayParser=\n        !@ (pText ((=) \"Begin\")) ^+\u003e\u003e yUntil (fun _ -\u003e true) !@ (pText ((=) \"Until\"))\n\n    let shift= workSheet\n               |\u003erunArrayParser parser\n               |\u003efun c-\u003ec.xShifts\n\n    match shift with\n    | [0;0;0;0;0;0;0] -\u003epass()\n    |_-\u003efail()\n```\n## Advanced: Parser with fparsec parsers and with matrix tuple returned\nSee [Tests.MatrixParsers.fs](https://github.com/humhei/ExcelProcesser/blob/master/ExcelProcesser.Tests/Tests.MatrixParsers.fs) For Details\n## Debug Test In VsCode\n  * open reposity in VsCode\n  * .paket/paket.exe install\n  * cd ExcelProcesser.Tests\n  * dotnet restore\n  * press F5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumhei%2Fexcelprocesser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumhei%2Fexcelprocesser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumhei%2Fexcelprocesser/lists"}