Could not find a declaration file for module '@grapecity/spread-excelio

Posted by: Shalini89garg on 6 July 2018, 3:37 am EST

  • Posted 6 July 2018, 3:37 am EST

    Hello Team ,
    I have installed below two packages .
    npm install @grapecity/spread-sheets
    npm install @grapecity/spread-excelio

    first package i am able to import but second package is
    giving issue.Could not find a declaration file for module '@grapecity/spread-excelio

    import { Spread } from '@grapecity/spread-sheets'; is working but
    import { IO } from '@grapecity/spread-excelio'; is giving error
  • Marked as Answer

    Replied 9 July 2018, 8:29 am EST

    Hi Shalini,

    You can use the following statement to import the Excel IO Module:
    import * as Excel from '@grapecity/spread-excelio';

    And then instantiate it as below:
    this.excelIO = new Excel.IO();
  • Replied 27 July 2018, 9:03 am EST

    Hello Michael ,

    Even import * as Excel from '@grapecity/spread-excelio' is giving same error .

    Could not find a declaration file for module '@grapecity/spread-excelio'.

    /node_modules/@grapecity/spread-excelio/index.js' implicitly
    has an 'any' type.

    I have installed below two packages

    npm install @grapecity/spread-sheets
    npm install @grapecity/spread-excelio

    . Import Export functionality is blocked because of this.
    Could you please help on this.
  • Replied 30 July 2018, 5:06 am EST

    Hi Shalini,

    Please refer to the attached sample. Please install angular-cli before running the sample also run run npm-install command to not to miss on any package.


    Thannks,
    Deepak Sharma
    spread-sheets-angular-cli.zip
  • Replied 31 July 2018, 2:37 am EST

    Hello Deepak,

    I am working on load spread js on demand,
    So Requirement is that in angular cli we should not load script /css for spread.
  • Replied 31 July 2018, 7:19 am EST

    Hi Shalini,

    SpreadJS has UMD support, you can follow the steps given here to work with UMD.
    http://help.grapecity.com/spread/SpreadSheets11/webframe.html#UMDSupport.html

    Thanks,
    Deepak Sharma
  • Replied 31 July 2018, 7:45 am EST

    Hello Deepak,

    How to add spread css for UMD support .could you please share any sample
  • Replied 31 July 2018, 12:39 pm EST

    Hello Deepak,

    In the same example as you shared , is there any other way to keep spread css file except keeping in angular cli, we do not want to load css file while loading angular cli.
  • Replied 1 August 2018, 8:12 am EST

    Hello,

    I have asked the development team to look into this issue. I will let you know as soon as I get an update on this.
    The tracking id for this issue is :261571

    Thanks,
    Deepak Sharma
  • Replied 3 August 2018, 7:08 am EST

    Hi Shalini,

    It is an issue related to Angular and not SpreadJS.
    However I would like to inform you, SpreadJS CSS can not be loaded at component style level so adding to global styles is the way that angular official recommends.


    Thanks,
    Deepak Sharma
Need extra support?

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

Learn More

Forum Channels