FRangePrint

GitHubEdit on GitHub
packages@univerjs-pro/sheets-print

APIs

getScreenshot

Get screenshot of this range. This API is only available with a license. Users without a license will face usage restrictions. On failure, it returns false, and on success, it returns the image's base64 string.

Signature

getScreenshot(options?: IRangeScreenshotOptions): string | false

Parameters

  • options (IRangeScreenshotOptions) — - Screenshot options.

Returns

  • (string | false) — - The base64 encoded image string, or false if the user does not have permission.

Examples

const fWorkbook = univerAPI.getActiveWorkbook()
const fWorksheet = fWorkbook.getActiveSheet()
const fRange = fWorksheet.getRange('A1:D10')
// Screenshot without headers
console.log(fRange.getScreenshot())
// Screenshot with row and column headers
console.log(fRange.getScreenshot({ includeHeaders: true }))

Table of Contents

Capalyze