Range to DIFFERENT range


#1

Hello!

What we need is to move a range of cells on one sheet to a range on anoter sheet. The problem is that the destination range has to be of different size. That is, we move a table 5x7 from a sheet to a range, say 2x3. The objective is to scale the original table so that it would fit a predefined size.
We are moving this functionality from a VBA code where it was done via a Word ole object which was put into an Excel worksheet's oleobject collection and then copy-pasted to a destination cell.
................cut....................
Windows("SourceFile").Activate
Sheets("SourceSheet").Select
................................................
ActiveSheet.OLEObjects.Add(ClassType:="Word.Document", Link:=False, DisplayAsIcon:=False).Activate
Range("B70:M71").Select
.......................................
ActiveSheet.OLEObjects(9).Verb
Range("B70:M71").Copy
Set objApp = ActiveSheet.OLEObjects(9).Object.Application
objApp.Selection.Paste
......................................................................
ActiveSheet.OLEObjects(9).Select
.......................................................
Selection.Copy
Windows("DestFile").Activate
....................................................
Sheets("DestSheet").Select
Range("H32").Select

ActiveSheet.PasteSpecial Format:="Microsoft Word-Document-Object", Link:=False, DisplayAsIcon:=False
................cut....................


How to reproduce this by means of Aspose, provided Aspose.Excel doesn't expose OLEObjects collection? We just have to show one range in place of another range as a picture, no other functionality needed.

Thanks




#2

Aspose.Excel doesn’t support to manipulate OLE objects at run time. We don’t have enough information on the underline binary data for OLE Object.