Skip to content

Infragistics Community Forum / Web / Ignite UI for Angular / Export to Excel using multiple sheets

Export to Excel using multiple sheets

New Discussion
Rameez Sadikot
Rameez Sadikot asked on May 18, 2023 6:01 AM

Hi Team,

We are developing a screen where user should be able to download data to Excel of multiple components in the page. The components can be charts, tables or anything. Ideally each of them will be having a json data in the angular model.

Now our requirement needs the following:

  1. Export data into a single Excel file but each component data into multiple sheets.
  2. Formatting the data with a nice information at the top in multiple rows which explains what the data is about and then the table. Also it will be good if we can add our company logo at the top of each sheet.

Looking forward to your help.

Thanks

Sign In to post a reply

Replies

  • 0
    Teodosia Hristodorova
    Teodosia Hristodorova answered on May 11, 2023 10:23 AM

    Hello,

    I have been looking into your question and my suggestion is to take a look at our Excel Library which gives you the opportunity to create separate worksheets, populate them with required data and format them per your requirement.
    More about it can be found in our documentation under the Excel Library section.

    If you require any further assistance on the matter, please let me know.

    Sincerely,
    Teodosia Hristodorova
    Software Developer

    • 0
      Rameez Sadikot
      Rameez Sadikot answered on May 12, 2023 7:07 AM

      Hi Teodosia,

      Thanks for your response. 

      Can you please give me a sample to add png image to the sheet. I didn't find any sample or demo in the Excel Library section.

      I want our company logo to be added in mid of the First row.

      Please let us know how to achieve this.

      Thanks

      • 0
        Teodosia Hristodorova
        Teodosia Hristodorova answered on May 17, 2023 6:34 AM

        Hello,

        An approach I could suggest is to use WorksheetImage. In its constructor, you need to pass a base64 string of the required image. Afterward, you need to set its position and add it to the Worksheet shapes collection. For example:

         const wb = new Workbook(WorkbookFormat.Excel2007);
            const imageSheet = wb.worksheets().add('Image');
            const img = new WorksheetImage(this.imageBase64);
            img.topLeftCornerCell = imageSheet.rows(0).cells(0);
            img.topLeftCornerPosition = new Point(0, 0);
            img.bottomRightCornerCell = imageSheet.rows(2).cells(2);
            img.bottomRightCornerPosition = new Point(50, 50);
            img.setBoundsInTwips(imageSheet, img.getBoundsInTwips());
            imageSheet.shapes().add(img);
            this.wb = wb;

        Please test it on your side and let me know if I may be of any further assistance.

        Sincerely,
        Teodosia Hristodorova
        Software Developer

      • 0
        Rameez Sadikot
        Rameez Sadikot answered on May 18, 2023 2:23 AM

        Thanks this worked. 

      • 0
        Teodosia Hristodorova
        Teodosia Hristodorova answered on May 18, 2023 6:01 AM

        Hello,

        I am glad that you find my suggestion helpful.

        Thank you for using Infragistics components.

        Regards,
        Teodosia Hristodorova
        Software Developer

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Rameez Sadikot
Favorites
0
Replies
5
Created On
May 18, 2023
Last Post
2 years, 9 months ago

Suggested Discussions

Created by

Created on

May 18, 2023 6:01 AM

Last activity on

Feb 25, 2026 9:27 AM