Skip to content

WorksheetToImage Error  #53

@shahkarraza001

Description

@shahkarraza001

While Converting the excel file to Image I get the error com.aspose.cells.CellsException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed. Below is my Code

                val workBook = Workbook(fileOptions.filePath)
                val imgOptions = ImageOrPrintOptions()
                imgOptions.imageType = ImageType.PNG
                imgOptions.allColumnsInOnePagePerSheet = true
                imgOptions.outputBlankPageWhenNothingToPrint = false
                val sheet: Worksheet =
                    workBook.worksheets.get(workBook.worksheets.activeSheetIndex)
                val sr = SheetRender(sheet, imgOptions)
                for (j in 0 until sr.pageCount) {
                    // Generate an image for the worksheet
                    val imageFilePath = getPngFileName(fileOptions.filePath!!, j)
                    sr.toImage(j, imageFilePath)
                    mOutputFilePaths.add(imageFilePath)

Below is the excel file attached

rase.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions