Hi,
When converting an Excel sheet with data bars on cells to Emf/OfficeCompatibleEmf using Aspose.Cells. I noticed the lines became dotted.
Code:
var workbook = new Workbook(@".\test.xlsx");
var ws = workbook.Worksheets[0];
ws.PageSetup.PrintArea = “B5:E11”;
ws.PageSetup.LeftMargin =
ws.PageSetup.RightMargin = ws.PageSetup.TopMargin = ws.PageSetup.BottomMargin = ws.PageSetup.HeaderMargin = ws.PageSetup.FooterMargin = 0;
var optionsOfficeCompatibleEmf = new ImageOrPrintOptions
{
ImageType = ImageType.OfficeCompatibleEmf,
OnlyArea = false,
TextRenderingHint = TextRenderingHint.AntiAlias,
OnePagePerSheet = true,
Transparent = true,
HorizontalResolution = 600,
VerticalResolution = 600
};new SheetRender(workbook.Worksheets[0], optionsOfficeCompatibleEmf).ToImage(0, @".\outOfficeCompatibleEmf.emf");
var optionsEmfPlus = new ImageOrPrintOptions
{
ImageType = ImageType.Emf,
OnlyArea = false,
TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
OnePagePerSheet = true,
Transparent = true
};new SheetRender(workbook.Worksheets[0], optionsEmfPlus).ToImage(0, @".\outEmfPlus.emf");
I’ve attached the test files, output and a screenshot for your reference. Could you please take a look?
test.zip (53.6 KB)
image.png (42.8 KB)
Thanks,