{"skill":{"slug":"camscanner-image2office-office","displayName":"CamScanner-Image2Office","summary":"Use CamScanner to intelligently recognize image content and accurately convert to editable Word (.docx) or Excel (.xlsx) format. Handles tables, text, and co...","description":"---\nname: camscanner-image2office\ndescription: Use CamScanner to intelligently recognize image content and accurately convert to editable Word (.docx) or Excel (.xlsx) format. Handles tables, text, and complex layouts with high fidelity. Triggers on \"image to Word\", \"image to Excel\", \"extract table from image to Excel\", \"OCR to Word\", or when the user has an image containing text or tables and needs it as an editable Office document.\nmetadata:\n  author: CamScanner\n  version: \"1.0\"\n  openclaw:\n    emoji: \"📷\"\n    requires:\n      bins: [\"curl\", \"jq\"]\n  homepage: \"https://www.camscanner.com\"\n---\n\n# CamScanner Image to Office\n\n## Overview\n\nCamScanner provides one-click conversion from images to structured documents, converting image documents to Word or Excel documents while preserving original formatting, greatly improving subsequent editing and processing efficiency. The workflow is a 3-step pipeline: **upload** the image, **convert** it, then **download** the result.\n\n## When to Use\n\n- User wants to convert an image to Word (.docx) or Excel (.xlsx)\n- User has an image with tables and needs it as an Excel spreadsheet\n- User has an image with text or complex layouts and needs it as an editable Word document\n\n## Privacy & Data\n\n> **Important: Privacy & Data Flow Notice**\n>\n> - **Third-party service**: This skill sends your files to CamScanner's official servers (`ai-tools.camscanner.com`) for processing.\n> - **Data retention**: CamScanner servers process your files in real-time. Files are not permanently stored on the server.\n> - **Local files**: Output files are saved to your local filesystem at the path you specify.\n\n## API Reference\n\n**Base URL:** `https://ai-tools.camscanner.com`\n\n### Supported Conversions\n\n| source_type | target_type | Output |\n| ----------- | ----------- | ------ |\n| image       | word        | .docx  |\n| image       | excel       | .xlsx  |\n\n### Step 1: Upload Image\n\n```bash\nBASE=\"https://ai-tools.camscanner.com\"\n\nIN_FILE_ID=$(curl -sS -X POST \"$BASE/v1/tools/upload_file/execute\" \\\n  -H \"Content-Type: application/octet-stream\" \\\n  --data-binary \"@/path/to/image.png\" | jq -r '.tool_result.data.file_id')\n```\n\n**Response:**\n\n```json\n{\n  \"code\": 200,\n  \"tool\": \"upload_file\",\n  \"tool_result\": {\n    \"success\": true,\n    \"data\": {\n      \"file_id\": \"file_1741857600_ab12cd34ef56\",\n      \"size\": 24576\n    }\n  }\n}\n```\n\n### Step 2: Convert Image\n\n```bash\nOUT_FILE_ID=$(curl -sS -X POST \"$BASE/v1/tools/convert_image/execute\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"file_id\\\":\\\"$IN_FILE_ID\\\",\\\"source_type\\\":\\\"image\\\",\\\"target_type\\\":\\\"TARGET\\\",\\\"output_mode\\\":\\\"file_id\\\"}\" \\\n  | jq -r '.tool_result.data.file_id')\n```\n\nReplace `TARGET` with one of: `word`, `excel`.\n\n**Response:**\n\n```json\n{\n  \"code\": 200,\n  \"tool\": \"convert_image\",\n  \"tool_result\": {\n    \"success\": true,\n    \"data\": {\n      \"file_id\": \"file_1741857701_9988aabbccdd\",\n      \"target_type\": \"word\"\n    }\n  }\n}\n```\n\n### Step 3: Download Result\n\n```bash\ncurl -sS -X POST \"$BASE/v1/tools/download_file/execute?response_mode=raw\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"file_id\\\":\\\"$OUT_FILE_ID\\\"}\" \\\n  -o /path/to/output.docx\n```\n\n**Critical:** The `response_mode=raw` query parameter is required to get the binary file. Without it, the response is JSON.\n\n## Quick Reference: Complete Pipeline\n\n```bash\nBASE=\"https://ai-tools.camscanner.com\"\nINPUT_IMAGE=\"/path/to/image.png\"\nTARGET_TYPE=\"word\"          # word | excel\nOUTPUT_FILE=\"/path/to/output.docx\"\n\n# Upload\nIN_FILE_ID=$(curl -sS -X POST \"$BASE/v1/tools/upload_file/execute\" \\\n  -H \"Content-Type: application/octet-stream\" \\\n  --data-binary \"@$INPUT_IMAGE\" | jq -r '.tool_result.data.file_id')\n\n# Convert\nOUT_FILE_ID=$(curl -sS -X POST \"$BASE/v1/tools/convert_image/execute\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"file_id\\\":\\\"$IN_FILE_ID\\\",\\\"source_type\\\":\\\"image\\\",\\\"target_type\\\":\\\"$TARGET_TYPE\\\",\\\"output_mode\\\":\\\"file_id\\\"}\" \\\n  | jq -r '.tool_result.data.file_id')\n\n# Download\ncurl -sS -X POST \"$BASE/v1/tools/download_file/execute?response_mode=raw\" \\\n  -H \"Content-Type: application/json\" \\\n  -d \"{\\\"file_id\\\":\\\"$OUT_FILE_ID\\\"}\" \\\n  -o \"$OUTPUT_FILE\"\n```\n\n## File Extension Mapping\n\n| target_type | Extension |\n| ----------- | --------- |\n| word        | .docx     |\n| excel       | .xlsx     |\n\n## Common Mistakes\n\n| Mistake                                    | Fix                                                                     |\n| ------------------------------------------ | ----------------------------------------------------------------------- |\n| Forgetting `response_mode=raw` on download | Always append `?response_mode=raw` to the download URL                  |\n| Wrong Content-Type on upload               | Upload uses `application/octet-stream`, not `multipart/form-data`       |\n| Using GET instead of POST                  | All three endpoints use POST                                            |\n| Missing `source_type` in convert request   | Always include `\"source_type\": \"image\"`                                 |\n| Missing `output_mode` in convert request   | Always include `\"output_mode\": \"file_id\"` to get a downloadable file_id |\n| Wrong output extension                     | Match extension to target_type (see table above)                        |\n\n## Error Handling\n\nCheck each step before proceeding:\n\n```bash\n# After upload\nif [ -z \"$IN_FILE_ID\" ] || [ \"$IN_FILE_ID\" = \"null\" ]; then\n  echo \"Upload failed\"; exit 1\nfi\n\n# After convert\nif [ -z \"$OUT_FILE_ID\" ] || [ \"$OUT_FILE_ID\" = \"null\" ]; then\n  echo \"Conversion failed\"; exit 1\nfi\n```\n","topics":["OCR","Document"],"tags":{"latest":"1.0.2"},"stats":{"comments":0,"downloads":469,"installsAllTime":18,"installsCurrent":0,"stars":0,"versions":3},"createdAt":1775542116446,"updatedAt":1778492452586},"latestVersion":{"version":"1.0.2","createdAt":1777539803284,"changelog":"- Renamed the skill from \"camscanner-pdf2office\" to \"camscanner-image2office\".\n- Updated functionality to support converting images (not PDFs) to editable Word (.docx) or Excel (.xlsx) documents.\n- Changed the main conversion API step to use the convert_image endpoint for image input.\n- Updated trigger phrases and description to focus on image-to-Office document use cases, including OCR for text and tables.\n- Adjusted usage examples, API references, and troubleshooting sections for image workflows.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"camscanner-ai","userId":"s173fgwczhaenp3btzq1h17qss84dnaa","displayName":"CamScanner-AI","image":"https://avatars.githubusercontent.com/u/269073986?v=4"},"moderation":null}