renebigot / XlsxReaderWriter

XlsxReaderWriter is an Objective-C library for iPhone / iPad and Mac. It parses and writes MS Excel XLSX files.
MIT License
437 stars 119 forks source link

Issue in writing image to xlsx file using XlsxReaderWriter #98

Open developertechnostacks opened 6 years ago

developertechnostacks commented 6 years ago

@renebigot

I am trying to write image in xlsx file using this library, as per the document suggests method to write image in xlsx file i followed the same but was unable to succeed.

Below are the code snippet that i used to write images

First method

Worksheet.add(image, inCellReferenced: "A2", withOffset: CGPoint(x:15, y:10), size: (image?.size)! , preserveTransparency: true) Second method

let drawing: BRAWorksheetDrawing = Worksheet.add(image, betweenCellsReferenced: "C2", and: "D2", with: UIEdgeInsets.zero, preserveTransparency: false)
drawing.insets = UIEdgeInsetsMake(0.0, 0.0, 0.5, 0.5)

Using this both methods i was unable to write the images to xlsx file, any help will be great.!