{"id":15992188,"url":"https://github.com/dxe4/xls_to_mysql_insert","last_synced_at":"2025-03-27T07:31:37.663Z","repository":{"id":10730891,"uuid":"12984729","full_name":"dxe4/xls_to_mysql_insert","owner":"dxe4","description":"Create sql inserts from excel files","archived":false,"fork":false,"pushed_at":"2013-09-29T22:11:50.000Z","size":10312,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T10:35:22.460Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/dxe4.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}},"created_at":"2013-09-20T21:56:06.000Z","updated_at":"2024-04-09T03:34:10.000Z","dependencies_parsed_at":"2022-09-04T02:12:37.564Z","dependency_job_id":null,"html_url":"https://github.com/dxe4/xls_to_mysql_insert","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxe4%2Fxls_to_mysql_insert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxe4%2Fxls_to_mysql_insert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxe4%2Fxls_to_mysql_insert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxe4%2Fxls_to_mysql_insert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxe4","download_url":"https://codeload.github.com/dxe4/xls_to_mysql_insert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245802750,"owners_count":20674741,"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":[],"created_at":"2024-10-08T06:05:54.921Z","updated_at":"2025-03-27T07:31:32.653Z","avatar_url":"https://github.com/dxe4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"xls_to_mysql_insert\n===================\n\n    Create sql insert files from excel files\n    git clone https://github.com/papaloizouc/xls_to_mysql_insert.git\n\n    Tested on windows xp 32bit and arch linux.\n    You only have to install python3.3.\n\nIf for some reason the sh/bat file won't work you here's the instructions to get the libraries you need:\n\n    Windows (optional)\n\n    download python3.3\n    download http://python-distribute.org/distribute_setup.py\n    run python distribute_setup.py (on windows you may have to add to path C:\\Python33)\n    run C:\\Python33\\Scripts\\easy_install xlrd\n\n    Linux (optional)\n\n    download python3.3\n    wget http://python-distribute.org/distribute_setup.py\n    python3.3 distribute_setup.py\n    easy_install-3.3 xlrd\n\n#Examples:\n\nRun flat mode:\n---\n\n    windows: flat_mode.bat doc\\example_flat.xls\n\n    linux: ./flat_mode.sh doc/example_flat.xls\n\n    manualy: python xtsi.py doc/example_flat.xls f\n\n\nInput Flat Mode:\n---\n![alt text](https://raw.github.com/papaloizouc/xls_to_mysql_insert/master/doc/xls_file_.png \"Input\")\nOutput Flat Mode:\n---\n\n    example_flat.sql:\n```mysql\n    INSERT INTO `the_schema`.`the_table`\n    (`col100000` ,`col2`  ,`col3`  )\n    VALUES\n    (`val13`     ,`val24` ,`val35` )\n    ;\n```\n\n\n```mysql\n    INSERT INTO `the_schema`.`Table_2`\n    (`col1` ,`col2`   ,`col3`      )\n    VALUES\n    (`901`  ,NULL     ,`3`         )\n    (`3213` ,`54`     ,NULL        )\n    (NULL   ,`765765` ,NULL        )\n    (NULL   ,`55.55`  ,`90909090`  )\n    (NULL   ,NULL     ,curdate()   )\n    ;\n```\nRun sheet mode:\n---\n\n    windows: sheet_mode.bat doc\\example_sheet.xls\n\n    linux: ./sheet_mode.sh doc/example_sheet.xls\n\n    manualy: python xtsi.py doc/example_sheet.xls\n\n\nInput Sheet Mode:\n---\n![alt text](https://raw.github.com/papaloizouc/xls_to_mysql_insert/master/doc/xls_file_sheets.png \"Input\")\n\n\nOutput Sheet Mode:\n---\n\n    example_sheet.sql:\n```mysql\n    INSERT INTO `sheet_schema`.`table_name`\n    (`col1` ,`col2`                          ,`col3`  ,`col000000000000000000000` )\n    VALUES\n    (`1`    ,`a`                             ,NULL    ,NULL                       )\n    (`2`    ,`b`                             ,`33.33` ,`99.99`                    )\n    (`3`    ,`very big row must be allgined` ,NULL    ,`5f34`                     )\n    (`4`    ,`d`                             ,`321`   ,`5fe`                      )\n    (`5`    ,NULL                            ,NULL    ,NULL                       )\n    ;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxe4%2Fxls_to_mysql_insert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxe4%2Fxls_to_mysql_insert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxe4%2Fxls_to_mysql_insert/lists"}