We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Resulting table borders are thicker than original


I’ve attached a xlsx file that contains a table. When I run the following code into a web application, the resulting pptx file and the docx file are different than the saved to pdf selected area.

var xls1 = new Workbook(“C:\11.xlsx”);
var worksheet = xls1.Worksheets[“Sheet1”];
for (int i = 0; i < xls1.Worksheets.Count; i++)

var opt = new ImageOrPrintOptions
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Png,
OnePagePerSheet = true,
OnlyArea = false
xls1.Worksheets[“Sheet1”].PageSetup.PrintArea = “B2:H15”;
var sh1 = new SheetRender(xls1.Worksheets[“Sheet1”], opt);
var image = sh1.ToImage(0);

var ppt = new Presentation();
var slide = ppt.Slides[0];
IPPImage imgx = ppt.Images.AddImage(image);
slide.Shapes.AddPictureFrame(ShapeType.Rectangle, 10, 10, imgx.Width, imgx.Height, imgx);
ppt.Save(“C:\ex.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);

var doc1 = new Document();
var docBuilder1 = new Aspose.Words.DocumentBuilder(doc1);
doc1.Save(“C:\ex.docx”, Aspose.Words.SaveFormat.Docx);

Thank you,
George Radu
IBM Romania


Internal id: 57154


Thanks for your posting and using Aspose.Cells.

If VerticalResolution = 200 and HorizontalResolution = 200 is set, the generated image is similar to the 200% zoom view in the pdf.

Please refer to this thread.