Skip to main content

Range to Image

Exports a range of cells to an image file (PNG format), capturing the exact appearance of the cells including formatting.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing the node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.

Input

  • File Descriptor - File descriptor of the Excel file. This is the identifier returned by the Open Excel node.
  • Range - Cell range to export (e.g., A1:C10, B5:F20).
  • Image Path - (Optional) Full path where the image will be saved. If left empty, a temporary file is generated.

Output

  • Image Path - Path to the exported image file (PNG format).

Options

This node has no additional options.

Example

Exporting a table to an image:

// File Descriptor: message.excel_fd
// Range: "A1:D10"
// Image Path: "C:\\Reports\\data_table.png"
// Output: "C:\\Reports\\data_table.png"

Exporting to a temporary file:

// Range: "B5:F20"
// Image Path: (leave empty)
// Output: A temporary file path like "C:\\Users\\...\\tmp12345.png"

Creating a screenshot of formatted data:

// Range: "A1:H50"
// Image Path: "C:\\Screenshots\\report_section.png"
// Captures the visual appearance including colors, borders, and fonts

Using the exported image in reports:

// 1. Range to Image
// Range: "A1:E15"
// Output: image_path

// 2. Send email with the image
// Attachment: message.image_path

Tips

  • The image captures the visual appearance of the range, including:
    • Cell values and formatting (fonts, colors, alignment)
    • Borders and gridlines
    • Background colors and patterns
    • Merged cells
  • The range must be valid Excel notation (e.g., "A1:C10").
  • The exported image is in PNG format with transparent background where applicable.
  • Use this to create snapshots of formatted reports or data tables.
  • The image resolution is based on the current screen display settings.
  • For exporting charts, use Chart to Image instead.

Common Errors

ErrorSolution
Range cannot be emptyProvide a valid cell range (e.g., A1:C10)
Invalid RangeUse proper Excel range notation (StartCell:EndCell)
Invalid File DescriptorEnsure the Open Excel node was executed first
Permission deniedEnsure you have write permissions for the target directory