グラフ作成元のデータが存在するシートを削除する必要があるため
加工元のExcelに存在するグラフを画像化して加工後のExcelに張り付けています。
同一の座標に画像を張り付けたいのですが、セル単位での貼り付けになるため場所がずれ、A4セルの左上を起点に張り付けられます。
ピクセル単位で張り付ける位置を調整できますか?
Dim stream As New MemoryStream
Dim chart As Aspose.Cells.Charts.Chart = ws.Charts(j)
chart.ToImage(stream, ImageType.Png)
Dim upperLeftRow As Integer = 4
Dim upperLeftColumn As Integer = 1
ws.Pictures.Add(upperLeftRow, upperLeftColumn, stream)
test.zip (12.8 KB)