From 3569c76e53ff5a151eef3f648e01a24d855527eb Mon Sep 17 00:00:00 2001 From: Misaka_Company Date: Wed, 28 Jan 2026 11:24:01 +0800 Subject: [PATCH] fix: skip empty VBA modules during extraction to avoid creating unnecessary files - Add check in _process_module() to detect modules with no actual code content - Display skip message for empty modules instead of creating files - Prevent empty modules from being added to metadata Co-Authored-By: Claude Sonnet 4.5 --- extract_vba.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extract_vba.py b/extract_vba.py index aa832dd..7840194 100644 --- a/extract_vba.py +++ b/extract_vba.py @@ -305,6 +305,11 @@ class VBAExtractor: # 解析Attribute信息 attributes, clean_code = self.parse_attributes(vba_code) + # 检查是否有实际代码内容(跳过空模块) + if not clean_code.strip(): + print(f" [跳过] {module_name} - 无实际代码内容") + return + # 确定实际的模块类型 module_type = self._determine_module_type(module_name, category)