{"data":{"slug":"github-opensensenova-sensenova-skills-skills-sn-da-excel-workflow-capability-excel-data-filtering-threshold-filtering-46b5a82ed4c7","title":"Excel Threshold Analysis and Styling","summary":"Automatically analyze Excel data based on scale, clean numeric columns, filter records, and apply styling to cells meeting specific numeric conditions.","url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-da-excel-workflow-capability-excel-data-filtering-threshold-filtering-46b5a82ed4c7","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-opensensenova-sensenova-skills-skills-sn-da-excel-workflow-capability-excel-data-filtering-threshold-filtering-46b5a82ed4c7","markdown_url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-da-excel-workflow-capability-excel-data-filtering-threshold-filtering-46b5a82ed4c7.md","download_url":"https:\/\/skillshunter.net\/skills\/github-opensensenova-sensenova-skills-skills-sn-da-excel-workflow-capability-excel-data-filtering-threshold-filtering-46b5a82ed4c7\/download","category":{"slug":"data-research","name":"Data & Research"},"editor_note":"The tool requires the input file to be in Excel format (e.g., .xlsx) and uses pandas and openpyxl for data processing and styling. The user must specify the target sheet and column for cleaning and filtering.","instructions":"---\nname: excel-threshold-analysis-and-styling\ndescription: \"\u6839\u636e Excel \u6570\u636e\u91cf\u7ea7\u81ea\u52a8\u5224\u65ad\u5904\u7406\u7b56\u7565\uff0c\u6267\u884c\u6570\u503c\u5217\u6e05\u6d17\u3001\u6761\u4ef6\u8fc7\u6ee4\uff0c\u5e76\u4f7f\u7528 openpyxl \u5bf9\u7b26\u5408\u6761\u4ef6\u7684\u5355\u5143\u683c\u8fdb\u884c\u6837\u5f0f\u6807\u8bb0\u4e0e\u5bfc\u51fa\u3002\"\n---\n\n# Excel Threshold Analysis and Styling\n\n> **Note**: This sub-skill covers one step of the Excel analysis workflow. For the full pipeline (file reading, row counting, large-file optimization, export), see the parent workflow SKILL.md.\n\n\nStep1 \u8bfb\u53d6 Excel \u6587\u4ef6\u4e2d\u6240\u6709\u5de5\u4f5c\u8868\u7684\u884c\u6570\u5e76\u6c47\u603b\uff0c\u7528\u4e8e\u8bc4\u4f30\u6570\u636e\u89c4\u6a21\u3002\n```python\nimport pandas as pd\n\nfile_path = 'input_file.xlsx'\n\n# \u8bfb\u53d6\u6240\u6709 sheet \u540d\u79f0\u5e76\u7edf\u8ba1\u603b\u884c\u6570\nxls = pd.ExcelFile(file_path)\nsheet_names = xls.sheet_names\ntotal_rows = 0\n\nfor sheet in sheet_names:\n    # header=None \u7528\u4e8e\u5feb\u901f\u7edf\u8ba1\u5305\u542b\u8868\u5934\u7684\u603b\u884c\u6570\n    df_tmp = pd.read_excel(file_path, sheet_name=sheet, header=None)\n    rows = len(df_tmp)\n    total_rows += rows\n    print(f\"Sheet '{sheet}': {rows} \u884c\")\n\nprint(f\"\\n\u603b\u884c\u6570\u6c47\u603b: {total_rows}\")\n```\n\nStep2 \u5bf9\u76ee\u6807\u6570\u636e\u8868\u8fdb\u884c\u6e05\u6d17\uff0c\u5c06\u6307\u5b9a\u5217\u7684\u975e\u6570\u503c\u5185\u5bb9\u8f6c\u6362\u4e3a\u7f3a\u5931\u503c\u5e76\u5254\u9664\uff0c\u786e\u4fdd\u6570\u636e\u7c7b\u578b\u4e3a\u6570\u503c\u578b\u3002\n```python\ntarget_sheet = 'Sheet1'\ntarget_col = '\u6570\u91cf' # \u5f85\u5904\u7406\u7684\u76ee\u6807\u5217\u540d\nheader_idx = 1     # \u8868\u5934\u6240\u5728\u884c\u7d22\u5f15\uff080\u5f00\u59cb\u8ba1\u6570\uff09\n\ndf = pd.read_excel(file_path, sheet_name=target_sheet, header=header_idx)\n\n# \u5f3a\u5236\u8f6c\u6362\u6570\u503c\u7c7b\u578b\uff0c\u65e0\u6cd5\u8f6c\u6362\u7684\u5185\u5bb9\u53d8\u4e3a NaN \u5e76\u5220\u9664\ndf[target_col] = pd.to_numeric(df[target_col], errors='coerce')\ndf_cleaned = df.dropna(subset=[target_col])\n\nprint(f\"\u6e05\u6d17\u5b8c\u6210\uff0c\u6709\u6548\u6570\u636e\u884c\u6570: {len(df_cleaned)}\")\n```\n\nStep3 \u7b5b\u9009\u7b26\u5408\u7279\u5b9a\u6570\u503c\u6761\u4ef6\u7684\u8bb0\u5f55\u5e76\u8fdb\u884c\u7edf\u8ba1\u3002\n```python\nfilter_threshold = 10 \ndf_filtered = df_cleaned[df_cleaned[target_col] > filter_threshold]\n\nprint(f\"{target_col} \u5927\u4e8e {filter_threshold} \u7684\u8bb0\u5f55\u5171\u6709 {len(df_filtered)} \u6761\")\n```\n\nStep4 \u4f7f\u7528 openpyxl \u5bf9\u539f\u59cb\u6587\u4ef6\u4e2d\n","use_cases":["Automate data cleaning and filtering for large Excel datasets.","Apply conditional formatting to highlight cells with values above a threshold.","Streamline data preparation for reports and analysis."],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/OpenSenseNova\/SenseNova-Skills\/blob\/07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b\/skills\/sn-da-excel-workflow\/capability\/excel-data-filtering\/threshold-filtering\/SKILL.md","source_commit":"07e7ff8c4bdfd7b79e7402fe94af59d2a5a9749b","license":null,"version":null,"listing_approved_at":"2026-11-16","created_at":"2026-11-15T08:24:40.000000Z","updated_at":"2026-11-16T05:16:30.000000Z","seo_title":"Excel Threshold Analysis and Styling Tool","seo_description":"Automate Excel data analysis by scaling, cleaning, filtering, and styling numeric cells based on thresholds. Efficient for data processing and reporting.","seo_keywords":["Excel data analysis","Excel conditional formatting","Excel data cleaning","Excel threshold filtering","Excel automation"]}}