| Property Getters/Setters Summary | ||
|---|---|---|
method | getColumn() | |
Gets the column index of the sparkline.
|
||
method | getDataRange() | |
method | setDataRange(value) | |
| Represents the data range of the sparkline. | ||
method | getRow() | |
Gets the row index of the sparkline.
|
||
| Method Summary | ||
|---|---|---|
method | toImage(stream, options) | |
Converts a sparkline to an image.
|
||
method | toImage(fileName, options) | |
Converts a sparkline to an image.
|
||
method | toImageBytes(options) | |
Converts a sparkline to an image.
|
||
String getDataRange() / setDataRange(value)
int getRow()
int getColumn()
toImage(fileName, options)
fileName: String - The image file name.options: ImageOrPrintOptions - The image optionstoImage(stream, options)
stream: OutputStream - The image stream.options: ImageOrPrintOptions - The image options.toImageBytes(options)
options: ImageOrPrintOptions - Addtional image creation optionsExample:
import jpype
import asposecells
jpype.startJVM()
from asposecells.api import *
wb = Workbook("sparkline.xlsx")
sparkline = wb.getWorksheets().get(0).getSparklineGroupCollection().get(0).getSparklineCollection().get(0)
imgOptions = ImageOrPrintOptions()
imgOptions.setHorizontalResolution(200)
imgOptions.setVerticalResolution(300)
imgOptions.setImageFormat(ImageFormat.getJpeg())
with open("sparkline.jpeg", "wb") as w:
content = sparkline.toImageBytes(imgOptions)
w.write(content)
jpype.shutdownJVM()