Angular13 unable to get Print to work

Posted by: Kevin.Happe on 23 February 2024, 10:50 am EST

  • Posted 23 February 2024, 10:50 am EST

    I have followed the Angular Print example. But no matter what I do.

    Workbook.print is not defined.

    Package.json has

    @grapecity/spread-excelio”: “^16.0.0”,

    @grapecity/spread-sheets”: “^16.0.0”,

    @grapecity/spread-sheets-pdf”: “^16.0.0”,

    @grapecity/spread-sheets-print”: “^16.0.0”,

    @grapecity/spread-sheets-angular”: “^16.0.0”,

    These are my imports.

    In AppModule

    [,SpreadSheetsModule…]

    In a Component

    import GC from ‘@grapecity/spread-sheets’;

    import ‘@grapecity/spread-sheets-print’;

    And the workBook.print method is undefined.

  • Posted 25 February 2024, 11:52 pm EST

    Hi,

    I attempted to reproduce the issue on my end but was unsuccessful. I was able to use the print method correctly. Please refer to the attached sample. In the sample, I have added a print button that uses the print method. You can try clicking on it to check if it is working or not.

    To better assist you, could you share a sample along with the steps to replicate the behavior you have observed, or modify the existing sample to replicate the behavior? This will enable me to investigate the problem more thoroughly. And It would be helpful if you could provide a GIF or video illustrating the issue.

    Sample: Angular13SampleV16.0.0.zip

    Regards,

    Priyam

  • Posted 27 February 2024, 4:30 am EST - Updated 27 February 2024, 5:22 am EST

    I’ve been playing with this for a couple of days. In your simple example, it works. In our large project it does not. (We have many modules.)

    I’ve compared our packages, tsconfig settings.

    How we import spreadJs in a component compared to your example.

    Nothing seems different.

    One big difference is that we dont not use SpreadSheetsModule.

    We have an angular app, but we access the grid via javascript methods.

    Do you have anything else that we might try?

  • Posted 28 February 2024, 3:48 pm EST

    Hi,

    It’s possible that there could be an incorrect implementation causing the issue. However, without a sample to debug the root cause, it’s challenging to provide specific suggestions. Therefore, it would be beneficial if you could share a sample demonstrating the issue, along with steps to replicate it or modify the existing sample to replicate the behavior.

    If your application is extensive, you can simplify it by creating a working sample that replicates the problem. This will allow for a more thorough investigation. Additionally, providing a GIF or video illustrating the issue would be helpful for better understanding.

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels