how to use document generation(text and image) about excel

According to the explanation of the demo, Document Generation (Text and Images) is possible for Excel, how should I apply Field for Excel?

I use Next js 15

1 Like

Thank you for contacting us about this. Just to clarify, are you referring to template generation? If so, it is possible to create Excel templates and convert them to PDF with the JSON as described in the documentation.

Please see the guide linked above for some examples. They are using DOCX files, but you may swap them out with XLSX files according to your workflow. Please also ensure you have downloaded and is using the latest version of the SDK.

1 Like

Thank you for your cooperation.

I updated webviewersdk 11.2.0 to 11.3.0, which made it possible.

However, there is a phenomenon that the border and properties of the Cell are lost when using the loop function within the Excel file, is there a way to solve this?

1 Like

Thank you for your reply.

You can set the cell border width under the format options listed here: Apryse WebViewer Namespace: UI
For example:

instance.UI.loadDocument(file, {
  officeOptions: {
    formatOptions: {
      excelDefaultCellBorderWidth: 1,
    },
  },
});

Regards,
Luke

1 Like

Thank you for your reply

I’ve already tried this format option as an option to border for the entire cell, but this is not a feature I want, and I’d like to apply the border only to Cells with Loop functionality.

excel_sample2.xlsx (12.2 KB)

This attachment is a sample file that I used, and Cell Border is already applied to this file, but if I use Loop, the Border is disappearing.

May I know what options I should use to load files to solve this problem?

Regards

1 Like

Thank you for your reply.

Currently, we cannot add a border for just the loop function cells as provided in the document. This would be a feature request for our Product Team to review. If you would like to continue with creating a feature request, please submit a ticket with our support team here: Apryse

Regards,
Luke

1 Like

Thank you for your reply.

I submit a ticket for your support team according to your advice.

Regards,

1 Like