{"id":27351909,"url":"https://github.com/sukhjindersukh/exclim","last_synced_at":"2025-04-12T20:54:06.834Z","repository":{"id":52538555,"uuid":"192504017","full_name":"sukhjindersukh/exclim","owner":"sukhjindersukh","description":"This is excel slim library to read excel sheet as java class(pojo).","archived":false,"fork":false,"pushed_at":"2022-06-29T17:27:01.000Z","size":42,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T20:54:01.294Z","etag":null,"topics":["automation","data-providers","excel","framework","pojo","selenium","testing","testing-framework","testng"],"latest_commit_sha":null,"homepage":"","language":"Java","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/sukhjindersukh.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}},"created_at":"2019-06-18T09:00:26.000Z","updated_at":"2024-08-12T19:19:46.000Z","dependencies_parsed_at":"2022-08-28T15:33:41.762Z","dependency_job_id":null,"html_url":"https://github.com/sukhjindersukh/exclim","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhjindersukh%2Fexclim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhjindersukh%2Fexclim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhjindersukh%2Fexclim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sukhjindersukh%2Fexclim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sukhjindersukh","download_url":"https://codeload.github.com/sukhjindersukh/exclim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631718,"owners_count":21136560,"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":["automation","data-providers","excel","framework","pojo","selenium","testing","testing-framework","testng"],"created_at":"2025-04-12T20:54:06.186Z","updated_at":"2025-04-12T20:54:06.824Z","avatar_url":"https://github.com/sukhjindersukh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to exclim!\nThis is excel slim library to read excel sheet as Java POJO(Plain Old Java Object).\n\n# Add dependency for your project\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.sukhjindersukh\u003c/groupId\u003e\n  \u003cartifactId\u003eExlim\u003c/artifactId\u003e\n  \u003cversion\u003e1.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# How to use it\n1. Create a Excel sheet let say **Employee** with fields   \n*Name* and *DOB*.\n\n| Name               |DOB\n|----------------|-------------------------------\n|Employee_1 |25-05-1989\n|Employee_2 |15-02-1980\n|Employee_3 |02-05-2000\n\n## Now read all data in java\n2. Create a simple java class with exactly same name of your sheet in our case **Employee**\n\n  ```java\n      public class Employee {  \n          String Name, DOB;  \n      \n        public String getName() {  \n            return Name;  \n        }  \n      \n        public void setName(String name) {  \n            Name = name;  \n        }  \n      \n        public String getDOB() {  \n            return DOB;  \n        }  \n      \n        public void setDOB(String DOB) {  \n            this.DOB = DOB;  \n        }  \n      \n        @Override  \n      public String toString() {  \n            return \"Employee{\" +  \n                    \"Name='\" + Name + '\\'' +  \n                    \", DOB='\" + DOB + '\\'' +  \n                    '}';  \n        }  \n    }\n```\n### If you dont want to use getter setter you can use [project lombok](https://projectlombok.org) dependency to reduce your getter setter and toString code.\n```xml\n       \u003cdependency\u003e\n            \u003cgroupId\u003eorg.projectlombok\u003c/groupId\u003e\n            \u003cartifactId\u003elombok\u003c/artifactId\u003e\n            \u003cversion\u003e1.18.8\u003c/version\u003e\n            \u003cscope\u003eprovided\u003c/scope\u003e\n        \u003c/dependency\u003e\n```\n### Aftre addition of library write your java POJO(Plain Old Java Object) just use annotation @Data thats it. You are ready to use \n ```java\n      @Data\n      public class Employee {  \n          String Name, DOB;  \n     }\n```\n\n\n\n3. Create another java class with  to test our **Employee**  class is working or not\n\n\n```java\npublic class EmployeeModelTest {\n@Test  \npublic void employeeTest(){  \n    Exl exl = new Exl();  \n    exl.setDateDataFormat(\"MM-dd-yyy\");  \n    String path = \"src/test/resources/TestData.xlsx\";  \n    List\u003cEmployee\u003e employees = exl.read(Employee.class, path);  \n    for (Employee employee : employees) {  \n        System.out.println(employee.toString());  \n  \n    }  \n    Assert.assertTrue(employees.size()\u003e0);  \n}\n\n}\n```\n\n\u003e **Default date time format is dd-MM-yyyy** \n\n# One another way to use it\n```java\n              Exl exl = new Exl();\n              exl.openWorkbook(path);\n              Recordset recordset =exl.getRecords(\"Employee\");\n              exl.closeWorkbook();\n              List\u003cRecordset.Record\u003e records = recordset.getRecords();\n              for(Recordset.Record record:records){\n                  System.out.println(record.getValue(\"Name\"));\n              }\n```\n\n# Generate your jar!\n\u003emvn clean package\n\n# Thanks for coming here! Feedback highly appreciated.\n# If you like it then hit :sun_with_face:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhjindersukh%2Fexclim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsukhjindersukh%2Fexclim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsukhjindersukh%2Fexclim/lists"}