본문으로 건너뛰기
cccskills
무료GitHub에 공개

openpyxl-sandbox-workaround

Continue Excel file creation and editing when execute_code_sandbox repeatedly fails with openpyxl errors. Use run_shell to run Python directly, then check that the workbook was saved with the expected sheets and content.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Use run_shell with inline Python as a fallback when execute_code_sandbox fails for openpyxl/spreadsheet operations

연동 도구Excel
설치 방법 보기

이럴 때 유용합니다

  • Continuing Excel creation after sandbox errors
  • Editing existing workbooks and adjusting column widths
  • Checking saved workbook sheets and content

포함된 파일(2)

  • SKILL.md3.3 KB
  • .skill_id41 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Openpyxl Sandbox Workaround

When to Use

Use this pattern when execute_code_sandbox repeatedly fails for openpyxl or spreadsheet manipulation tasks. The sandbox environment may have compatibility issues with certain openpyxl operations, but running Python directly via run_shell often succeeds.

Common Failure Indicators

  • execute_code_sandbox returns errors related to openpyxl imports or operations
  • Multiple retry attempts fail with similar errors
  • Errors mention workbook creation, cell writing, or file saving issues

The Workaround Pattern

Instead of using execute_code_sandbox, use run_shell with an inline Python script:

python3 << 'EOF'
from openpyxl import Workbook
from openpyxl.utils import get_column_letter

# Your openpyxl code here
wb = Workbook()
ws = wb.active
ws.title = "Sheet1"

# Add data
ws['A1'] = 'Header'
ws['B1'] = 'Value'

# Save file
wb.save('output.xlsx')
print('File created successfully')
EOF

Multi-Step Spreadsheet Tasks

For complex operations involving multiple files or data processing:

python3 << 'EOF'
from openpyxl import Workbook, load_workbook
import os

# Load existing workbook if needed
if os.path.exists('input.xlsx'):
    wb = load_workbook('input.xlsx')
    ws = wb.active
    # Process data...
    
# Create new workbook
wb = Workbook()
ws = wb.active

# Add data with proper formatting
for row_idx, row_data in enumerate(data, start=1):
    for col_idx, value in enumerate(row_data, start=1):
        ws.cell(row=row_idx, column=col_idx, value=value)

# Auto-adjust column widths
for column in ws.columns:
    max_length = 0
    column_letter = get_column_letter(column[0].column)
    for cell in column:
        try:
            if len(str(cell.value)) > max_length:
                max_length = len(str(cell.value))
        except:
            pass
    adjusted_width = min(max_length + 2, 50)
    ws.column_dimensions[column_letter].width = adjusted_width

wb.save('output.xlsx')
EOF

Best Practices

  1. Use heredoc syntax: The << 'EOF' pattern prevents variable expansion issues
  2. Print success messages: Always include print statements to confirm completion
  3. Handle file paths: Use absolute paths or ensure you're in the correct working directory
  4. Validate output: After creation, verify the file exists and has expected content
  5. Error handling: Add try/except blocks for robustness in complex scripts

Verification Step

After running the script, verify the file was created:

ls -la *.xlsx

Or check file details:

python3 << 'EOF'
from openpyxl import load_workbook
wb = load_workbook('output.xlsx')
print(f"Sheets: {wb.sheetnames}")
print(f"Active sheet: {wb.active.title}")
EOF

When to Fall Back to This Pattern

  • First execute_code_sandbox attempt fails with openpyxl errors
  • Error persists after 1-2 retries
  • Task is time-sensitive and needs a reliable solution
  • The operation is straightforward file creation/modification

Limitations

  • Output is limited to stdout/stderr (no direct artifact download from run_shell)
  • Files are created in the current working directory
  • More verbose than execute_code_sandbox for simple operations

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace7.8천2026년 8월 13일 업데이트

HKUDS의 스킬 모두 보기

이 스킬의 문제 신고