{"id":26254599,"url":"https://github.com/bilal-fazlani/exceltosqlscripts","last_synced_at":"2025-04-28T10:23:43.474Z","repository":{"id":75327214,"uuid":"88293510","full_name":"bilal-fazlani/ExcelToSqlScripts","owner":"bilal-fazlani","description":"A small command line tool to help you convert data of excel files into insert statements in SQL syntax.","archived":false,"fork":false,"pushed_at":"2023-02-13T16:16:02.000Z","size":761,"stargazers_count":34,"open_issues_count":2,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-05T16:14:30.809Z","etag":null,"topics":["convert","dotnet","excel","excel-to-sql","script","sql"],"latest_commit_sha":null,"homepage":"","language":"C#","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/bilal-fazlani.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}},"created_at":"2017-04-14T18:41:24.000Z","updated_at":"2025-02-19T10:25:40.000Z","dependencies_parsed_at":"2023-06-09T00:45:37.295Z","dependency_job_id":null,"html_url":"https://github.com/bilal-fazlani/ExcelToSqlScripts","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilal-fazlani%2FExcelToSqlScripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilal-fazlani%2FExcelToSqlScripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilal-fazlani%2FExcelToSqlScripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilal-fazlani%2FExcelToSqlScripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilal-fazlani","download_url":"https://codeload.github.com/bilal-fazlani/ExcelToSqlScripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243458100,"owners_count":20294166,"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":["convert","dotnet","excel","excel-to-sql","script","sql"],"created_at":"2025-03-13T18:28:58.145Z","updated_at":"2025-03-13T18:28:58.739Z","avatar_url":"https://github.com/bilal-fazlani.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Nuget](https://img.shields.io/nuget/v/ExcelToSqlScripts.Console?label=Latest%20Nuget%20Version\u0026style=for-the-badge)](https://www.nuget.org/packages/ExcelToSQLScripts.Console)\n\n# Setup instructions\n\nThis small command line tool to help you convert data of excel files into insert statements in SQL syntax.\n\n1. Navigate to [dotnet core website](https://www.microsoft.com/net/core) and follow instructions to install dotnet core\n2. `dotnet tool install -g ExcelToSQLScripts.Console`\n3. `excel2sql --help`\n\nNote: Ensure that you have `~/.dotnet/tools` path added in your $PATH variable\n\n\n# Generating SQL scripts\n\nYou can generate 3 types of scripts i.e. insert scipts, update scripts \u0026 merge scripts.\n\n##### Sample Input\n\n![Excel](https://raw.githubusercontent.com/bilal-fazlani/ExcelToSqlScripts/master/Readme/Sample_Input.png)\n\n### Insert scripts\n\n```\nexcel2sql insert -i \u003cPATH_TO_XLSX_FILE\u003e -o \u003cOUTPUT_DIRECTORY_FOR_SQL_FILES\u003e\n```\n\n##### Sample Output\n\n```sql\nINSERT INTO EMPLOYEES (ID, NAME, LOCATION) VALUES (1, 'John', 'India');\nINSERT INTO EMPLOYEES (ID, NAME, LOCATION) VALUES (2, 'Jason', 'US');\n```\n\n### Update scripts\n\n```\nexcel2sql update -i \u003cPATH_TO_XLSX_FILE\u003e -o \u003cOUTPUT_DIRECTORY_FOR_SQL_FILES\u003e\n```\n\n##### Sample Output\n\n```sql\nUPDATE EMPLOYEES SET NAME = 'John', LOCATION = 'India' WHERE ID = 1;\nUPDATE EMPLOYEES SET NAME = 'Jason', LOCATION = 'US' WHERE ID = 2;\n```\n\n### Merge scripts\n\n```\nexcel2sql merge -i \u003cPATH_TO_XLSX_FILE\u003e -o \u003cOUTPUT_DIRECTORY_FOR_SQL_FILES\u003e\n```\n\n##### Sample Output\n\n```sql\nMERGE INTO EMPLOYEES T\nUSING (SELECT 1 ID, 'John' NAME, 'India' LOCATION FROM DUAL) D\nON (T.ID = D.ID)\nWHEN MATCHED THEN \nUPDATE SET T.NAME = D.NAME, T.LOCATION = D.LOCATION\nWHEN NOT MATCHED THEN \nINSERT (ID, NAME, LOCATION) VALUES (D.ID, D.NAME, D.LOCATION);\n\nMERGE INTO EMPLOYEES T\nUSING (SELECT 2 ID, 'Jason' NAME, 'US' LOCATION FROM DUAL) D\nON (T.ID = D.ID)\nWHEN MATCHED THEN \nUPDATE SET T.NAME = D.NAME, T.LOCATION = D.LOCATION\nWHEN NOT MATCHED THEN \nINSERT (ID, NAME, LOCATION) VALUES (D.ID, D.NAME, D.LOCATION);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilal-fazlani%2Fexceltosqlscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilal-fazlani%2Fexceltosqlscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilal-fazlani%2Fexceltosqlscripts/lists"}