I have a problem and I need your help to solve it.
I need export a spreadsheet in image format, for someone can see it in a smartphone.
I'm trying to use draw pages to save it in .jpg format... But it search something as a graphic... I need convert a range of cells in a image. (the exported image don't have nothing, is all white and must be a cell range in the image)
Here is my code:
Code: Select all
sub img
Dim oFilter
Dim args(1) as new com.sun.star.beans.PropertyValue
oFilter=CreateUnoService("com.sun.star.drawing.GraphicExportFilter")
oFilter.setSourceDocument(ThisComponent.drawPages(0))
args(0).Name = "URL" 'Where the file will be saved
args(0).Value = "file:///c:/Users/Gustavo Boladão/Desktop/bola.JPG" 'The destination URL
args(1).Name = "image" 'What type of file
args(1).Value = "jpeg" 'The file type
oFilter.filter(args())
end sub
IT'S URGENT!