# Symbols Are Appearing for a Number Column in PPT OLE Table

Hi Team,
I’m attaching the sample output file with standalone program to reproduce the issue.
I want to see the entire number in table in second column but appears as # symbols.

import java.awt.Color;
import java.io.ByteArrayOutputStream;

import com.aspose.cells.BorderType;
import com.aspose.cells.Cell;
import com.aspose.cells.CellBorderType;
import com.aspose.cells.ImageOrPrintOptions;
import com.aspose.cells.ImageType;
import com.aspose.cells.SheetRender;
import com.aspose.cells.Style;
import com.aspose.cells.TextAlignmentType;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.slides.FillType;
import com.aspose.slides.IOleEmbeddedDataInfo;
import com.aspose.slides.IOleObjectFrame;
import com.aspose.slides.ISlide;
import com.aspose.slides.LineStyle;
import com.aspose.slides.OleEmbeddedDataInfo;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;

public class OleGridGenerator {

    public static void main(String[] args) {
        Presentation presentation = new Presentation();
        
        try(ByteArrayOutputStream bout = new ByteArrayOutputStream()) {
            ISlide slide = presentation.getSlides().get_Item(0);
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.getWorksheets().get(0);
            worksheet.getCells().merge(0, 0, 1, 16);
            worksheet.getCells().get("A1").putValue("Table Title");
            
            Cell cell1 = worksheet.getCells().get("A2");
            cell1.putValue("Numbers");
            Style style = cell1.getStyle();
            Color color = Color.gray;
            com.aspose.cells.Color borderColor = com.aspose.cells.Color.fromArgb(color.getAlpha(), color.getRed(), color.getGreen(),
                color.getBlue());
            style.setBackgroundColor(borderColor);
            style.getFont().setSize(13);
            style.getFont().setBold(true);
            setStyleInfo(style, borderColor, cell1);
            style.setHorizontalAlignment(TextAlignmentType.LEFT);
            style.setBackgroundColor(borderColor);
            cell1.setStyle(style);
            
            Cell blankCell = worksheet.getCells().get("B2");
            Style styleBlank = blankCell.getStyle();
            styleBlank.getFont().setSize(13);
            styleBlank.setBackgroundColor(borderColor);
            setStyleInfo(styleBlank, borderColor, blankCell);
            
            Cell cell2 = worksheet.getCells().get("A3");
            cell2.putValue("Total Fruits in 2025 period");
            Style style1 = cell2.getStyle();
            style1.getFont().setSize(10);
            setStyleInfo(style1, borderColor, cell2);
            
            Cell cell3 = worksheet.getCells().get("A4");
            cell3.putValue("Total Fruits in 2024 period");
            Style style2 = cell3.getStyle();
            style2.getFont().setSize(10);
            setStyleInfo(style2, borderColor, cell3);
            
            Cell cell4 = worksheet.getCells().get("A5");
            cell4.putValue("Total Rotten fruits in 2025 period");
            Style style3 = cell4.getStyle();
            style3.getFont().setSize(10);
            setStyleInfo(style3, borderColor, cell4);
            
            Cell cell5 = worksheet.getCells().get("A6");
            cell5.putValue("Total Rotten Fruits in 2024 period");
            Style style4 = cell5.getStyle();
            style4.getFont().setSize(10);
            setStyleInfo(style4, borderColor, cell5);
            
            Cell cell6 = worksheet.getCells().get("A7");
            cell6.putValue("Total Saved Fruits in 2025 period");
            Style style5 = cell6.getStyle();
            style5.getFont().setSize(10);
            setStyleInfo(style5, borderColor, cell6);
            
            Cell cell7 = worksheet.getCells().get("A8");
            cell7.putValue("Total Saved Fruits in 2024 period");
            Style style6 = cell7.getStyle();
            style6.getFont().setSize(10);
            setStyleInfo(style6, borderColor, cell7);
            
            
            Cell cell9 = worksheet.getCells().get("B3");
            cell9.putValue(74496982);
            Style style9 = cell9.getStyle();
            setStyleInfo(style9, borderColor,cell9);
            
            Cell cell10 = worksheet.getCells().get("B4");
            cell10.putValue(73062883);
            Style style10 = cell10.getStyle();
            setStyleInfo(style10, borderColor, cell10);
            
            Cell cell11 = worksheet.getCells().get("B5");
            cell11.putValue(89096112);
            Style style11 = cell11.getStyle();
            setStyleInfo(style11, borderColor, cell11);
            
            
            Cell cell12 = worksheet.getCells().get("B6");
            cell12.putValue(17533108);
            Style style12 = cell12.getStyle();
            setStyleInfo(style12, borderColor, cell12);
            
            
            Cell cell13 = worksheet.getCells().get("B7");
            cell13.putValue(56963874);
            Style style13 = cell13.getStyle();
            setStyleInfo(style13, borderColor, cell13);
            
            
            Cell cell14 = worksheet.getCells().get("B8");
            cell14.putValue(56903174);
            Style style14 = cell14.getStyle();
            setStyleInfo(style14, borderColor, cell14);
            
            worksheet.autoFitColumns();
            worksheet.autoFitRows(true);
            worksheet.setGridlinesVisible(true);
            worksheet.getPageSetup().setPrintArea(worksheet.getCells().get(0, 0).getName() + ":"
                    + worksheet.getCells().get(25 + 1, 9).getName());
            workbook.getWorksheets().setOleSize(0, 25, 0, 9);
           
            byte[] imageByteArray = generateWorksheetAsImage(worksheet);
            workbook.save(bout, com.aspose.cells.SaveFormat.XLSX);
            float x = 28.5f;
            float y = 101;
            float width = 702.5f;
            float height = 355;
            
            IOleEmbeddedDataInfo dataInfo = new OleEmbeddedDataInfo(bout.toByteArray(), "xlsx");
            IOleObjectFrame oof = slide.getShapes().addOleObjectFrame(x, y,
                width, height, dataInfo);
            if (oof.getLineFormat() != null) {
                oof.getLineFormat().getFillFormat().setFillType(FillType.Solid);
                oof.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.lightGray);
                oof.getLineFormat().setWidth(1);
                oof.getLineFormat().setStyle(LineStyle.Single);
              }
            oof.getSubstitutePictureFormat().getPicture().setImage(presentation.getImages().addImage(imageByteArray));
            workbook.dispose();
            presentation.save("C:\\Temp\\CustomPPTwithOleObjects.pptx", SaveFormat.Pptx);
        }
        catch (Exception e) {
            System.err.println("error saving excel data in ppt" + e.getMessage());
            e.printStackTrace();
        }
        finally {
            if(presentation != null) {
                presentation.dispose();
            }
        }
    }

    private static void setStyleInfo(Style style, com.aspose.cells.Color borderColor, Cell cell) {
      style.setVerticalAlignment(TextAlignmentType.TOP);
      style.setBorder(BorderType.TOP_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.BOTTOM_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.LEFT_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.RIGHT_BORDER, CellBorderType.THIN, borderColor);
      style.setHorizontalAlignment(TextAlignmentType.CENTER);
      if( cell.getValue()!= null && cell.getValue() instanceof Number) {
        style.setCustom("Number");
      }else {
        style.setCustom("General");
      }
      
      style.getFont().setName("Arial");
      cell.setStyle(style);
    }

    private static byte[] generateWorksheetAsImage(Worksheet worksheet) {
        byte[] imageArray = null;
        try (ByteArrayOutputStream imageStream = new ByteArrayOutputStream()) {
          ImageOrPrintOptions imageOptions = new ImageOrPrintOptions();
          imageOptions.setImageType(ImageType.EMF);
          imageOptions.setOnlyArea(false);
          imageOptions.setOnePagePerSheet(true);
          SheetRender sheetRender = new SheetRender(worksheet, imageOptions);
          sheetRender.toImage(0, imageStream);
          imageArray = imageStream.toByteArray();
    }
        catch (Exception ex) {
        System.err.println("Error getting image array" + ex.getMessage());    
        }
        return imageArray;
        }

}

CustomPPTwithOleObjects.zip (35.0 KB)
Please provide suggestion how to fix this issue?

@VaradS

The issue of numbers appearing as “#” symbols in your OLE table in PowerPoint typically occurs when the cell width is insufficient to display the entire number. Here are several suggestions to resolve this:

  1. AutoFit Columns: Ensure that you are using the autoFitColumns() method correctly. This should be applied after all data is populated to ensure the columns adjust to fit the content.

  2. Set Column Width Manually: If auto-fitting does not resolve the issue, you can manually set the width of the column to accommodate the largest number. For example:

    worksheet.getCells().setColumnWidth(1, 20); // Adjust the width as needed
    
  3. Check Number Format: Ensure that the number format is set correctly. You can set a custom format for the cells if needed:

    style.setCustom("#,##0"); // Example for formatting large numbers
    
  4. Reduce Font Size: If the numbers are still not fitting, consider reducing the font size for that column:

    style.getFont().setSize(10); // Adjust as necessary
    
  5. Use a Different Data Type: If the numbers are very large, consider using a string representation instead of a numeric type, which can sometimes help with display issues.

After making these adjustments, save and check the output again. If the problem persists, please provide more details about the specific numbers causing the issue.

@VaradS,

I tested your scenario/case and I was able to reproduce the issue as you mentioned by using your sample code snippet. I found “#” symbols are appeared for the number column in the output image even using auto-fit columns operation (by Aspose.Cells) for the PPTX OLE table.

We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-46499

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Here the custom pattern for style is invalid so we cannot get the correct column width for those numeric values. If you just need the cells keep the original format according to their value type of number or general, just remove the code of setting custom please.

@VaradS,

After removing the specified lines of code from your snippet, it works correctly and as intended. Kindly consider change the method:
i.e.,

...
private static void setStyleInfo(Style style, com.aspose.cells.Color borderColor, Cell cell) {
      style.setVerticalAlignment(TextAlignmentType.TOP);
      style.setBorder(BorderType.TOP_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.BOTTOM_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.LEFT_BORDER, CellBorderType.THIN, borderColor);
      style.setBorder(BorderType.RIGHT_BORDER, CellBorderType.THIN, borderColor);
      style.setHorizontalAlignment(TextAlignmentType.CENTER);
      if( cell.getValue()!= null && cell.getValue() instanceof Number) {
        style.setCustom("Number");
      }else {
        style.setCustom("General");
}
      
      style.getFont().setName("Arial");
      cell.setStyle(style);
    }

with:

...
private static void setStyleInfo(Style style, com.aspose.cells.Color borderColor, Cell cell) {
        style.setVerticalAlignment(TextAlignmentType.TOP);
        style.setBorder(BorderType.TOP_BORDER, CellBorderType.THIN, borderColor);
        style.setBorder(BorderType.BOTTOM_BORDER, CellBorderType.THIN, borderColor);
        style.setBorder(BorderType.LEFT_BORDER, CellBorderType.THIN, borderColor);
        style.setBorder(BorderType.RIGHT_BORDER, CellBorderType.THIN, borderColor);
        style.setHorizontalAlignment(TextAlignmentType.CENTER);
        
        style.getFont().setName("Arial");
        cell.setStyle(style);
      }

Also, please find attached the output PPTX (after removing the specified part) file for your reference.
CustomPPTwithOleObjects.zip (35.6 KB)

Moreover, see the document with example on how to set custom numbers formatting for your reference: Number Settings|Documentation

Hi @amjad.sahi

Thanks for the reply.

We actually need a format to be applied, so we are applying the right format now which is as below

  if (cell.getValue() != null && cell.getValue() instanceof Number) {
      style.setCustom("#,##0");
    } else {
      style.setCustom("General");
    }

Also, we have come up with an api where in we have added a controller to invoke this standalone program to generate the OLE grid in ppt.

I am sharing the entire code here at last.

We notice this OLEGridGenerator code works fine without hash symbol on our local machine which uses below

image.png (94.3 KB)

local machine configs
OS - Windows 11 pro
JDK - Open JDK 21.0.1, 64 bit
RAM - 16 Gb
Aspose Cells and Slides version - 25.6

However when we deploy the same code to our Azure Kubernetes pod, we still see hash symbols getting populated in the ppt OLE Grid.

image.png (46.5 KB)

Infra details as below
NAME=“Oracle Linux Server”
VERSION=“8.10”
Base OS of the pod - Cent OS
Image of the pod - Amazon Corretto, JDK 21
RAM size - 10 Gb
Java Heap size - 6 Gb
Aspose Cells and Slides version - 25.6

Controller method

  @GetMapping(value = "/standalone/{exportTitle}")
  public void getStandAloneExport(@PathVariable("exportTitle") final String exportTitle,
      final HttpServletResponse response) throws IOException {
   if (exportTitle!= null && !exportTitle.isEmpty()) {
      fileName = exportTitle;
    } else {
      fileName = DiscoverExportConstants.NO_VALUE_PROVIDED;
    }
    fileName = fileName + "." + extension;
    response.addHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + fileName + "\"");
    this.ole.getPPT(response.getOutputStream());
  }

ole.getPPT method

public void getPPT(final OutputStream response) {
    Presentation presentation = new Presentation();
    presentation.getSlideSize().setSize(960, 540, SlideSizeScaleType.DoNotScale);

    try (ByteArrayOutputStream bout = new ByteArrayOutputStream()) {
      ISlide slide = presentation.getSlides().get_Item(0);
      slide.getHeaderFooterManager().setDateTimeVisibility(false);
      slide.getHeaderFooterManager().setSlideNumberVisibility(true);
      Workbook workbook = new Workbook();
      Worksheet worksheet = workbook.getWorksheets().get(0);
      worksheet.getCells().merge(ReportConstants.ZERO, ReportConstants.ZERO, ReportConstants.ONE,
          ReportConstants.SIXTEEN);
      worksheet.getCells().get("A1").putValue("Table Title");

      Cell cell1 = worksheet.getCells().get("A2");
      cell1.putValue("Facts");
      Style style = cell1.getStyle();
      style.getFont().setBold(true);
      Shade shade = new Shade();
      shade.setColor("#F2F4F2");
      ColourProvider colourProvider = new ColourProvider();
      com.aspose.cells.Color borderColor = colourProvider.getColorFromShade(shade);
      setStyleInfo(style, borderColor, cell1);
      style.setBackgroundColor(borderColor);
      style.getFont().setSize(13);
      cell1.setStyle(style);

      Cell blankCell = worksheet.getCells().get("B2");
      Style styleBlank = blankCell.getStyle();
      styleBlank.setBackgroundColor(borderColor);
      setStyleInfo(styleBlank, borderColor, blankCell);
      styleBlank.getFont().setSize(13);
      blankCell.setStyle(styleBlank);

      Cell cell2 = worksheet.getCells().get("A3");
      cell2.putValue("Total Fruits in current period");
      Style style1 = cell2.getStyle();
      setStyleInfo(style1, borderColor, cell2);

      Cell cell3 = worksheet.getCells().get("A4");
      cell3.putValue("Total Fruits in comparison period");
      Style style2 = cell3.getStyle();
      setStyleInfo(style2, borderColor, cell3);

      Cell cell4 = worksheet.getCells().get("A5");
      cell4.putValue("Total big Fruits in current period");
      Style style3 = cell4.getStyle();
      setStyleInfo(style3, borderColor, cell4);

      Cell cell5 = worksheet.getCells().get("A6");
      cell5.putValue("Total stale Fruits in comparison period");
      Style style4 = cell5.getStyle();
      setStyleInfo(style4, borderColor, cell5);

      Cell cell6 = worksheet.getCells().get("A7");
      cell6.putValue("Total retained Fruits in current period");
      Style style5 = cell6.getStyle();
      setStyleInfo(style5, borderColor, cell6);

      Cell cell7 = worksheet.getCells().get("A8");
      cell7.putValue("Total retained Fruits in comparison period");
      Style style6 = cell7.getStyle();
      setStyleInfo(style6, borderColor, cell7);


      Cell cell9 = worksheet.getCells().get("B3");
      cell9.putValue(74496982);
      Style style9 = cell9.getStyle();
      setStyleInfo(style9, borderColor, cell9);

      Cell cell10 = worksheet.getCells().get("B4");
      cell10.putValue(73062883);
      Style style10 = cell10.getStyle();
      setStyleInfo(style10, borderColor, cell10);

      Cell cell11 = worksheet.getCells().get("B5");
      cell11.putValue(89096112);
      Style style11 = cell11.getStyle();
      setStyleInfo(style11, borderColor, cell11);


      Cell cell12 = worksheet.getCells().get("B6");
      cell12.putValue(17533108);
      Style style12 = cell12.getStyle();
      setStyleInfo(style12, borderColor, cell12);


      Cell cell13 = worksheet.getCells().get("B7");
      cell13.putValue(56963874);
      Style style13 = cell13.getStyle();
      setStyleInfo(style13, borderColor, cell13);


      Cell cell14 = worksheet.getCells().get("B8");
      cell14.putValue(56903174);
      Style style14 = cell14.getStyle();
      setStyleInfo(style14, borderColor, cell14);

      worksheet.autoFitColumns();
      worksheet.autoFitRows(true);
      worksheet.setGridlinesVisible(false);
      worksheet.getPageSetup()
          .setPrintArea(worksheet.getCells().get(0, 0).getName() + ":" + worksheet.getCells().get(26, 9).getName());
      workbook.getWorksheets().setOleSize(0, 25, 0, 9);

      byte[] imageByteArray = generateWorksheetAsImage(worksheet);
      workbook.save(bout, com.aspose.cells.SaveFormat.XLSX);
      Float x = 28.5f;
      Float y = 101.0f;
      Float width = 902.5f;
      Float height = 355.0f;

      IOleEmbeddedDataInfo dataInfo = new OleEmbeddedDataInfo(bout.toByteArray(), "xlsx");
      IOleObjectFrame oof = slide.getShapes().addOleObjectFrame(x, y, width, height, dataInfo);
      if (oof.getLineFormat() != null) {
        oof.getLineFormat().getFillFormat().setFillType(FillType.Solid);
        oof.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.lightGray);
        oof.getLineFormat().setWidth(1);
        oof.getLineFormat().setStyle(LineStyle.Single);
      }
      oof.getSubstitutePictureFormat().getPicture().setImage(presentation.getImages().addImage(imageByteArray));
      workbook.dispose();
      workbook.dispose();
      //presentation.save("C:\\Temp\\CustomPPTwithOleObjects.pptx", SaveFormat.Pptx);
    } catch (Exception e) {
      System.err.println("error saving excel data in ppt" + e.getMessage());
      e.printStackTrace();
    } finally {
      if (presentation != null) {
        presentation.save(response, SaveFormat.Pptx);
        presentation.dispose();
      }
    }
  }

  private static void setStyleInfo(final Style style, final com.aspose.cells.Color borderColor, Cell cell) {
    style.setVerticalAlignment(TextAlignmentType.TOP);
    style.setBorder(BorderType.TOP_BORDER, CellBorderType.THIN, borderColor);
    style.setBorder(BorderType.BOTTOM_BORDER, CellBorderType.THIN, borderColor);
    style.setBorder(BorderType.LEFT_BORDER, CellBorderType.THIN, borderColor);
    style.setBorder(BorderType.RIGHT_BORDER, CellBorderType.THIN, borderColor);
    style.setHorizontalAlignment(TextAlignmentType.CENTER);
    if (cell.getValue() != null && cell.getValue() instanceof Number) {
      style.setCustom("#,##0");
    } else {
      style.setCustom("General");
    }

    style.getFont().setName("Arial");
    style.getFont().setSize(10);
    cell.setStyle(style);
  }

  private static byte[] generateWorksheetAsImage(final Worksheet worksheet) {
    byte[] imageArray = null;
    try (ByteArrayOutputStream imageStream = new ByteArrayOutputStream()) {
      ImageOrPrintOptions imageOptions = new ImageOrPrintOptions();
      imageOptions.setImageType(ImageType.EMF);
      imageOptions.setOnlyArea(false);
      imageOptions.setOnePagePerSheet(true);
      SheetRender sheetRender = new SheetRender(worksheet, imageOptions);
      sheetRender.toImage(0, imageStream);
      imageArray = imageStream.toByteArray();
    } catch (Exception ex) {
      System.err.println("Error getting image array" + ex.getMessage());
    }
    return imageArray;
  }

}

Attached the OLE PPT files from local and Env here →
OLE-PPT.zip (67.4 KB)

Please let us know if you need any more information.

Could you please check and update why from server, we are getting the hash symbols in 25.6 slides version ?

Thanks,
Thilak Babu

@Thilakbabu,

Thank you for sharing the details, screenshots, code snippets, and the output PPTX files generated in both environments using Aspose.Cells for Java and Aspose.Slides for Java.

It’s good to hear that the adjustments for custom number formatting have resolved the issue on your local environment. To further investigate the issue on Azure Kubernetes, I’ve logged the details and archives under your existing ticket “CELLSJAVA-46499” in our database. Rest assured, we will review it soon.

In the meantime, could you please test your scenario using the latest version of Aspose.Cells for Java v25.9 on Azure Kubernetes to see if it brings any improvement?

@Thilakbabu

Generally such kind of issue is caused by different settings of different environments. The most possible cause is that the default font used by the workbook is missed in the server. Would you please print out the default font and then check whether it is installed on the server? You may try to modify your code a bit and then run it on your server:

      ...
      Workbook workbook = new Workbook();
      Style styleDefault = wb.getDefaultStyle();
      System.out.println(styleDefault.getFont().getName()); //output the name and then check whether it is installed on the server
      styleDefault.getFont().setName("Arial");
      wb.setDefaultStyle(styleDefault);

      Worksheet worksheet = workbook.getWorksheets().get(0);
      worksheet.getCells().merge(ReportConstants.ZERO, ReportConstants.ZERO, ReportConstants.ONE,
          ReportConstants.SIXTEEN);
      worksheet.getCells().get("A1").putValue("Table Title");
      ...

Hi @amjad.sahi

We have tried with 25.9 Aspose cells version as well, Still we see the same issue only in the server. From local windows machine, all works fine.

Hi @johnson.shi / @amjad.sahi

We have tried the same code with the below Aspose versions in Server.

‘aspose-cells’, version: ‘24.6’
‘aspose-slides’, version:‘24.8’, classifier:‘jdk16’

Generated ppt works fine.

So, there is no issue with the font Arial. It’s installed in the server.

Issue is with 25.6 or greater versions of Aspose cells/slides.

Could you please check and help us in resolving this issue?

Thanks

@Thilakbabu
Thank you for your feedback. We will further investigate your issue. We will notify you promptly once there are any updates.

@Thilakbabu,

By the way, as suggested earlier, did you print out the default font and then check whether it is installed on the server? Please modify your code a bit (as following) and then run it on your server:

...
Workbook workbook = new Workbook();
Style styleDefault = wb.getDefaultStyle();
System.out.println(styleDefault.getFont().getName()); //output the name and then check whether it is installed on the server
styleDefault.getFont().setName("Arial");
wb.setDefaultStyle(styleDefault);

Worksheet worksheet = workbook.getWorksheets().get(0);
worksheet.getCells().merge(ReportConstants.ZERO, ReportConstants.ZERO, ReportConstants.ONE,         ReportConstants.SIXTEEN);
worksheet.getCells().get("A1").putValue("Table Title");
...

What is the result when processing the following line of code on the server:

System.out.println(styleDefault.getFont().getName());

If you are sure that “Arial” font is installed on the server, you may configure fonts directory in code (at the start of your program), so Aspose.Cells could find the relevant font precisely for rendering. Moreover, please also save to PDF file using Aspose.Cells for Java and attach the output PDF file here. We will look into it further.

@Thilakbabu ,

I checked the embedded EMF images in your shared “OLE-From-Env.pptx” and “OLE-From-Local.pptx”. The font used in the EMF image that embedded in “OLE-From-Env.pptx” is “DejaVu Sans” instead of “Arial”. It indicates that “Arial” font is not installed on your remote server.

Hi @amjad.sahi and @peyton.xu

As I already mentioned, the code snippet which we deployed in same server with below Aspose versions works perfectly fine.

aspose-cells’, version: ‘24.6’
‘aspose-slides’, version:‘24.8’, classifier:‘jdk16’

If the issue is because of font, then how it works for 24.x versions?

Also, if we have 4-5 digits, the numbers being properly shown in the OLE.

So we strongly believe that issue is not with font but with the latest Aspose versions.

Could you please check and update why it’s working in same server with 24.x Aspose versions but not with 25.6 versions?

Thanks

@Thilakbabu ,

The “Arial” font which is not installed on your remote environment is the key point.

System.out.println("Column Width before autofit: " + worksheet.getCells().getColumnWidthPixel(1));
worksheet.autoFitColumns();
System.out.println("Column Width after autofit: " + worksheet.getCells().getColumnWidthPixel(1));

Please log the colum width before/after autofit on your local and remote environments for Aspose.Cells 24.6 and 25.6.

Also, please share us the pptx files generated on your both environments with Aspose.Cells 24.6.

Sure @peyton.xu

We will check and update.

But were you able to get a chance to try the same code snippet in the server config which I have mentioned already ?

Thanks

Also, @peyton.xu

Could you please help me on How to check the EMF font in server ?

@Thilakbabu ,

It needs to parse the records of the EMF image to check the font used in it.
You can share the generated pptx files here, we will check the font used in EMF image.

Hi @peyton.xu
PFA pptx files for 24.6 and 25.6 aspose cells which we got from environment.
Please check the EMF font in both the files, also we logged column width before and after autofit as follows
Column width before autofit: 64 and Column width after autofit: 71 for both versions 24.6 and 25.6
Please check and suggest.

Thanks
asposeSlides.zip (66.8 KB)

@manavjaiswal
Thanks for your feedback and details. We will evaluate your issue further and get back to you soon.

@manavjaiswal ,

I checked the font used in the Emf images of v24.6 and v25.6. The fonts are both “DejaVu Sans”. You may find that the result of v24.6, the numbers are a little overlapped with the cell bound/border, this is not right for numbers.

Note: To get a similar outout as Excel, it is import that the used fonts in the source Excel file should be installed/avaliable during conversion. Otherwise, there will be various differences. Especially for layout, column width, number formatting.