{"id":19787122,"url":"https://github.com/hey-its-d2t2/csv-comparison","last_synced_at":"2026-05-10T05:40:06.060Z","repository":{"id":253649063,"uuid":"844117282","full_name":"hey-its-d2t2/CSV-Comparison","owner":"hey-its-d2t2","description":"The CSV Comparison is a Spring Boot application that compares two CSV files and generates a detailed comparison report. The report identifies missing rows and highlights differences in values for matching rows. The results are saved in a result CSV file and xlsx fiel..","archived":false,"fork":false,"pushed_at":"2024-08-18T13:51:31.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T14:09:08.390Z","etag":null,"topics":["apachepoi","java","maven","opencsv","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hey-its-d2t2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-08-18T12:44:24.000Z","updated_at":"2024-08-18T13:51:35.000Z","dependencies_parsed_at":"2024-08-18T14:33:46.150Z","dependency_job_id":null,"html_url":"https://github.com/hey-its-d2t2/CSV-Comparison","commit_stats":null,"previous_names":["hey-its-d2t2/csv-comparison"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hey-its-d2t2%2FCSV-Comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hey-its-d2t2%2FCSV-Comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hey-its-d2t2%2FCSV-Comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hey-its-d2t2%2FCSV-Comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hey-its-d2t2","download_url":"https://codeload.github.com/hey-its-d2t2/CSV-Comparison/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hey-its-d2t2%2FCSV-Comparison/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259204802,"owners_count":22821159,"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":["apachepoi","java","maven","opencsv","spring-boot"],"created_at":"2024-11-12T06:21:12.634Z","updated_at":"2026-05-10T05:40:06.028Z","avatar_url":"https://github.com/hey-its-d2t2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# CSV Comparison Service\n\n## Overview\n\nThe CSV Comparison Service is a Spring Boot application that compares two CSV files and generates a detailed comparison report. The report identifies missing rows and highlights differences in values for matching rows. The results are saved in a result CSV file.\n\n## Features\n\n- Compares two CSV files and identifies missing rows.\n- Highlights differences in values for matching rows.\n- Generates a result CSV file with detailed comparison information.\n\n## Technologies Used\n\n- Java\n- Spring Boot\n- OpenCSV\n- Apache POI\n\n## Getting Started\n\n### Prerequisites\n\n- Java 11 or higher\n- Maven\n- Spring Boot\n- OpenCSV library\n- Apache POI library\n\n### Installation\n\n1. **Clone the repository:**\n\n    ```bash\n    git clone https://github.com/your-username/csv-comparison-service.git\n    ```\n\n2. **Navigate to the project directory:**\n\n    ```bash\n    cd csv-comparison-service\n    ```\n\n3. **Build the project using Maven:**\n\n    ```bash\n    mvn clean install\n    ```\n\n4. **Run the application:**\n\n    ```bash\n    mvn spring-boot:run\n    ```\n\n## API Documentation\n\n### `GET /compare-csv`\n\nCompares two CSV files and generates a comparison report.\n\n#### Parameters\n\n- `file1Path` (String): The file path of the first CSV file.\n- `file2Path` (String): The file path of the second CSV file.\n- `resultFilePath` (String): The file path where the result CSV file should be saved.\n- `resultExcelPath` (String): The file path where the result Excel file should be saved.\n\n#### Response\n\n- **Success:**\n\n    ```json\n    {\n      \"message\": \"CSV files compared successfully. Results saved to /path/to/result.csv and /path/to/result.xlsx\"\n    }\n    ```\n\n- **Error:**\n\n    ```json\n    {\n      \"message\": \"Error during comparison: [errorMessage]\"\n    }\n    ```\n\n## Postman Testing Steps\n\n1. **Open Postman.**\n2. **Set the request type to `GET`.**\n3. **Enter the URL for the endpoint, e.g.,** `http://localhost:8080/compare-csv`.\n4. **In the `Params` section, add the following key-value pairs:**\n   - `file1Path` = `/path/to/first.csv`\n   - `file2Path` = `/path/to/second.csv`\n   - `resultFilePath` = `/path/to/result.csv`\n   - `resultExcelPath` = `/path/to/result.xlsx`\n5. **Click `Send`.**\n\n### Example Postman Request\n\n**URL:**\n\n```bash\nhttp://localhost:8080/compare-csv?file1Path=/data/file1.csv\u0026file2Path=/data/file2.csv\u0026resultFilePath=/data/result.csv\u0026resultExcelPath=/data/result.xlsx\n```\n## Code Decumentation\n\n`CSVComparisonController.java`\n\nThis controller class handles the comparison of two CSV files and generates a comparison report in CSV and Excel formats.\n\n### Methods\n- `compareCSVFiles(String file1Path, String file2Path, String resultFilePath, String resultExcelPath)`\n\n- **Description:** Compares two CSV files and writes the results to a CSV file and an Excel file. It identifies missing rows and differences in values.\n- **Parameters:**\n    - `file1Path` - Path to the first CSV file.\n    - `file2Path` - Path to the second CSV file.\n    - `resultFilePath` - Path where the result CSV file will be saved.\n    - `resultExcelPath`- Path where the result Excel file will be saved.\n- **Throws:**\n    - **IOException** - If an I/O error occurs during file operations.\n    - **CsvException** - If an error occurs while reading the CSV files.\n    - **Returns:** A success message or an error message if an exception occurs.\n\n- **createCellStyle(Workbook workbook, short color)**\n\n    -  **Description:** Creates a `CellStyle` with a specific background color for the Excel sheet.\n- **Parameters:**\n    - **workbook** - The workbook in which the style will be used.\n    - **color** - The index of the color to be applied.\n    - **Returns:** A CellStyle with the specified background color.\n ## Contact\n For any questions or support, please contact deepsinghkumar01@gmail.com .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhey-its-d2t2%2Fcsv-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhey-its-d2t2%2Fcsv-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhey-its-d2t2%2Fcsv-comparison/lists"}