Hi,
I face some issues when using code below using Aspose.Cells 19.12.0.0:
here the attachments: issues.zip (359.3 KB)
Here are the issues (check the attached images)
-
The lines are much thicker in Word than Excel (not so much with version Aspose 19.12.0.0 but still thicker)
-
The lines don’t seem to meet in the exact middle of the chart like they do in Excel and shows a star in the middle
-
The text spacing between letters is different
-
The text positioning differs
-
A red line that we had inserted in Excel did not keep its same position after it had been inserted into Word. It moved slightly to the left
-
Text that we had inserted (“Refer to footnote 2”) moved slightly to the left as well
Used code:
Workbook w2 = new Workbook(“Excel file with Images_V1.xlsx”);
Worksheet excelWorksheet = w2.Worksheets[“Composition of revenues”];
Aspose.Cells.Range range = excelWorksheet.Workbook.Worksheets.GetRangeByName(“BIPLI_KURTIS1”); 'BIPLI_KURTIS2 for issues 5 and 6
string startCell = CellsHelper.CellIndexToName(range.FirstRow, range.FirstColumn);
string endCell = CellsHelper.CellIndexToName(range.FirstRow + range.RowCount - 1, range.FirstColumn + range.ColumnCount - 1);
string rangeAddress = string.Format("{0}:{1}", startCell, endCell);
ImageOrPrintOptions options = new ImageOrPrintOptions();
options.AllColumnsInOnePagePerSheet = true;
options.ImageType = Aspose.Cells.Drawing.ImageType.Emf;
//options.ImageFormat = ImageFormat.Emf;
options.OnePagePerSheet = true;
options.HorizontalResolution = 600;
options.VerticalResolution = 600;
options.OnlyArea = true;
Aspose.Cells.PageSetup pageSetup = excelWorksheet.PageSetup;
pageSetup.PrintArea = rangeAddress;
using (MemoryStream imageStream = new MemoryStream())
{
SheetRender sr = new SheetRender(excelWorksheet, options);
sr.ToImage(0, imageStream);
Image.FromStream(imageStream).Save("19.12.0.0.png", ImageFormat.Emf);
//imagePartsList.Add(rangeName, );
};