Printing and Excel export workbook does not show Shapes

Posted by: niels on 28 March 2024, 2:51 pm EST

    • Post Options:
    • Link

    Posted 28 March 2024, 2:51 pm EST - Updated 28 March 2024, 2:56 pm EST

    v 17.0.20231.0

    A ‘VF’ custom function is converted into a shape for export to Excel

                using (var bitMap = sheet.SaveImage(cell.Row.Index, cell.Column.Index, cell.RowSpan, cell.ColumnSpan, (int)(rect.Width * zf), (int)(rect.Height * zf), WorksheetSubType.Corner))
                {
                    var reducedRect = new RectangleF(1, 1, bitMap.Width - 2, bitMap.Height - 2);
                    var bm = bitMap.Clone(reducedRect, PixelFormat.DontCare);
                    {
                        var shape = new CustomShape
                        {
                            Picture = bm,
                            Border = new EmptyBorder(),
                            Width = rect.Width-2,
                            Height = rect.Height-2,
                            ShapeOutlineColor = Color.White,
                            ShapeOutlineThickness = 0,
                        };
                        sheet.AddShape(shape, cell.Row.Index, cell.Column.Index, 1, 1, true);
                    }
    
    ..
    
    Spread.SaveExcel(fn, ExcelSaveFlags.UseOOXMLFormat);

    The shape shows nicely in Excel. But when printing with Excel the Shape is not visible.

  • Posted 1 April 2024, 8:45 pm EST

    Hi Niels,

    Thanks for reporting this issue.

    We are in discussions with the developers regarding this behavior. [Internal Tracking ID: SPNET-37506] We will update you on this as soon as we hear back from them.

    Thanks & Regards,

    Aastha

  • Posted 2 April 2024, 4:54 am EST

    My customer found it! In Spread, Page Setup, turn off Black White.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels