Skip to main content
Glama

xlwings Excel MCP Server

by hyunjae-labs
workbook.py1.22 kB
import logging from pathlib import Path from typing import Any from .exceptions import WorkbookError from .xlwings_impl.workbook_xlw import create_workbook_xlw, get_workbook_metadata_xlw from .xlwings_impl.sheet_xlw import create_worksheet_xlw logger = logging.getLogger(__name__) # xlwings 전환 완료 - openpyxl fallback 제거 def create_workbook(filepath: str, sheet_name: str = "Sheet1") -> dict[str, Any]: """Create a new Excel workbook with optional custom sheet name""" result = create_workbook_xlw(filepath, sheet_name) if "error" in result: raise WorkbookError(result["error"]) return result def create_sheet(filepath: str, sheet_name: str) -> dict: """Create a new worksheet in the workbook if it doesn't exist.""" result = create_worksheet_xlw(filepath, sheet_name) if "error" in result: raise WorkbookError(result["error"]) return result def get_workbook_info(filepath: str, include_ranges: bool = False) -> dict[str, Any]: """Get metadata about workbook including sheets, ranges, etc.""" result = get_workbook_metadata_xlw(filepath, include_ranges) if "error" in result: raise WorkbookError(result["error"]) return result

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hyunjae-labs/xlwings-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server