You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
I'm probably doing this wrong, but it has me stumped.
I add an image to an ImageCell which is a 5x2 merged cell. Image displays perfectly in grid control, but does not save to XLSX file. Cell is there, but blank.
Am I missing a step?
Me.GC1.CurrentWorksheet.MergeRange(0, 0, 5, 2) ' build merged cell for logo
LOGO = CType(My.Resources.SDS, Image) ' load logo into image
Me.GC1.CurrentWorksheet(0, 0) = New unvell.ReoGrid.CellTypes.ImageCell(LOGO, CellTypes.ImageCellViewMode.Zoom) ' put logo into cell
Me.GC1.CurrentWorksheet.Cells(0, 0).Style.HAlign = ReoGridHorAlign.Center ' alignment
Me.GC1.CurrentWorksheet.Cells(0, 0).Style.VAlign = ReoGridVerAlign.Middle
Thanks in advance.
Never order the french onion soup in a Chinese restaurant.
Offline
kwebster, the code can be a little easier:
Me.GC1.CurrentWorksheet.MergeRange(0, 0, 5, 2) ' build merged cell for logo
Me.GC1.CurrentWorksheet(0, 0) = New ImageCell(My.Resources.photo, ImageCellViewMode.Zoom)
Me.GC1.CurrentWorksheet.Cells(0, 0).Style.HAlign = ReoGridHorAlign.Center ' alignment
Me.GC1.CurrentWorksheet.Cells(0, 0).Style.VAlign = ReoGridVerAlign.Middle
GC1.Save(Application.StartupPath & "\t1.xlsx", IO.FileFormat.Excel2007)
But I had such a mistake
The error is retained even if the cell with address 0.0 is a single (without merging cells)
We must await the decision of the component developers.
Last edited by alexeyrlx (2016-03-25 21:04:57)
My English is perfect! (My version of the English language ;-) )
Offline
Thanks Alexey.
Hi Kwebster, ImageCell is a feature that only works in ReoGrid, Excel doesn't support that put images into cells.
For export to Excel you have to use floating images, floating images is supported by ReoGrid Pro.
https://reogrid.net/document/floating-image
Offline
I like solving problems with the boss's credit card. Bought the Pro version and it works.
Floating images seem to be a lot more flexible anyway.
Never order the french onion soup in a Chinese restaurant.
Offline
Glad to hear that!
If you have other problems, questions and suggestions, feel free to post here or contact the support desk.
Offline
Pages: 1
Topic closed