{"id":21202204,"url":"https://github.com/shthemw/xlsx-data-console","last_synced_at":"2025-10-14T14:37:13.046Z","repository":{"id":209117283,"uuid":"707637960","full_name":"SHthemW/Xlsx-Data-Console","owner":"SHthemW","description":"允许对.xls和.xlsx表格文件以命令形式执行常用数据操作","archived":false,"fork":false,"pushed_at":"2023-12-22T04:43:13.000Z","size":362,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T15:09:23.451Z","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/SHthemW.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":"2023-10-20T10:29:09.000Z","updated_at":"2024-07-20T14:18:54.000Z","dependencies_parsed_at":"2023-12-21T09:34:56.002Z","dependency_job_id":null,"html_url":"https://github.com/SHthemW/Xlsx-Data-Console","commit_stats":null,"previous_names":["shthemw/uxgame-data-console"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SHthemW%2FXlsx-Data-Console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SHthemW%2FXlsx-Data-Console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SHthemW%2FXlsx-Data-Console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SHthemW%2FXlsx-Data-Console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SHthemW","download_url":"https://codeload.github.com/SHthemW/Xlsx-Data-Console/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243654828,"owners_count":20325966,"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-11-20T20:14:57.197Z","updated_at":"2025-10-14T14:37:08.024Z","avatar_url":"https://github.com/SHthemW.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xlsx-Data-Console 中文文档\nTo view English document, please access on: https://translate.google.com/\n\nXlDb是简易的数据库服务程序, 它支持以xlsx表格文件为数据源, 并构造简易数据库服务. 您可以方便的使用该程序查找多个xlsx表格文件中的特定关键字, 或是实现批量条件修改等功能.\n\n该程序尚处于开发状态, 后续将有更多有趣的功能与大家见面. 有时我不能及时保持文档的内容为最新, 请在遇到意外情况时联系我或提交issue.\n\n## 环境配置\n\n要使用XlDb, 你的PC需要拥有python3.8及以上的运行环境, 并配置相应的环境变量.  \npython下载链接: https://www.python.org/downloads/\n\n若不清楚是否具备环境, 可按以下方式查询:  \n\u003e 使用win+R键呼出\"运行\", 在对话框中输入```cmd```, 按Enter键进入命令行.  \n\u003e 在命令行中输入```python```并按Enter键. 若出现python的版本号信息, 则说明环境已配置正确.\n\n\n## 开始\n\n在git命令行中直接clone项目到本地:\n\n    git clone https://github.com/SHthemW/Xlsx-Data-Console.git\n\n\n打开程序的目录, 双击```startup.bat```即可进入程序.\n\n如果此时提示\"模块XXX\"不存在, 表示缺少该python库. 在Windows-cmd命令行中输入\n\n    pip install 模块名\n\n即可安装对应的包.\n\n初次运行时, 你会看到如下配置信息窗口:\n\n![](.resx/readme_imgs/welcome.jpg)\n\n完成配置信息的录入即可进入程序. 此后若需要修改配置信息, 可访问```安装目录/.resx/config.xml```.\n\n配置文件中字段的释义如下:  \n\u003e ```datasource```: 数据源路径, 程序会以给定目录下的所有```.xlsx```文件作为数据源进行操作.  \n\u003e ```windowtitle```: 打开.xlsx文件时的窗口尾缀. 打开任意一个xlsx文件, 文件名后面的部分即为尾缀. 需要包含空格. \n\u003e\u003e 在windows系统上使用excel时, 尾缀通常是``` - Excel```  \n\n\n## 使用命令\n\n恭喜! 当你看到如下图所示的界面时, 程序已经处于运行状态了.\n\n![](.resx/readme_imgs/cmd_1.png)\n\n下面, 从最简单的查询命令```find```开始, 我们来演示如何通过输入命令来实现数据操作.  \n\n要使用```find```命令, 请在命令行中按如下格式输入:  \n\u003e ```find FieldName```\n\n其中```FieldName```是你希望查找的字段的名称. 下图是一个示例:\n\n![](.resx/readme_imgs/cmd_find_1.png)\n\n此时按下Enter键, 程序将会查找所有```数据源路径```下中所有```.xlsx```文件中与该字段相匹配的单元格, 并按如下格式向你汇报:\n\n![](.resx/readme_imgs/cmd_find_2.jpg)\n\n\u003e 注意: 目前程序仅可以自动对齐英文字符. 如果你表格的单元格中含有中文字符, 则输出信息可能会出现如上图所示的不对齐情况.\n\n此时, 输入```open```命令, 还能快速打开查找到的表格文件.\n\n### 高级语法\n\n以上展示了```find```命令最基本的使用方式. 实际上, XlDb支持诸如批处理, 表达式等更高级的用法. 下面是一些示例:\n\n- 范围语句块:  \n\n    在指定表格文件中查找:\n    \u003e ```find FieldName in XXX(.xlsx)```  \n\n    在除了指定表格外的所有文件中查找 (在查询一个字段的来源时非常有用):\n    \u003e ```find FieldName except XXX(.xlsx)```\n\n- 连续查找表达式:\n\n    依次查找[1001, 1002]两个字段: (支持以空格分隔的任意数量字段)\n    \u003e ```find 1001 1002```  \n\n    依次查找[1001, 1002, 1003 1004 1005]这五个字段:\n    \u003e ```find 1001-1005```  \n\n    [与范围语句连用] 在XXX.xlsx中查找1001...1005这五个字段:\n    \u003e ```find 1001-1005 in XXX.xlsx```  \n\n- 条件匹配表达式:\n\n    查找所有\"命名空间\"列为\"UnityEngine\"的单元格:\n    \u003e ```find {命名空间=UnityEngine}```\n\n    [与连续查找表达式连用] 查找所有年龄为0-18岁的单元格\n    \u003e ```find {年龄=0-18}```\n\n## 更多\n\n您也可以输入```help```命令来查看更多命令的使用方法和帮助信息. 有时我可能无法及时在文档中更新最新内容, 此时程序内置的帮助功能将会是您最好的依靠.\n\n![](.resx/readme_imgs/cmd_help.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshthemw%2Fxlsx-data-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshthemw%2Fxlsx-data-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshthemw%2Fxlsx-data-console/lists"}