Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataValidation does not exist on type Excel.range #396

Closed
ianchouinard opened this issue Dec 24, 2018 — with docs.microsoft.com · 6 comments
Closed

dataValidation does not exist on type Excel.range #396

ianchouinard opened this issue Dec 24, 2018 — with docs.microsoft.com · 6 comments
Assignees

Comments

Copy link

Just installed the office add-in generator via yeoman 2 days ago. Created an angular/typescript excel add in. Trying to follow the examples here, but am getting the following type error dataValidation does not exist on type range.
When looking at the range class in the typings file for office-js, dataValidation isn't listed there.

I understand that range.dataValidation is from API v1.8, but I just installed the office add in generator via yeoman 2 days ago (so it should be there), and it is not clear how I check what version of the API I currently have, or how to update.

Thanks

package.json

  "dependencies": {
    "office-toolbox": "^0.1.0",
    "@angular/common": "^5.2.9",
    "@angular/compiler": "^5.2.9",
    "@angular/core": "^5.2.9",
    "@angular/platform-browser": "^5.2.9",
    "@angular/platform-browser-dynamic": "^5.2.9",
    "babel-polyfill": "^6.26.0",
    "@microsoft/office-js-helpers": "^1.0.1",
    "office-ui-fabric-js": "^1.3.0",
    "zone.js": "^0.8.20"
  },
  "devDependencies": {
    "@types/node": "^9.4.7",
    "@types/office-js": "^0.0.37",
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.4",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-preset-env": "^1.6.1",
    "typescript": "^2.7.2",
    "file-loader": "^1.1.11",
    "html-loader": "^0.5.5",
    "html-webpack-plugin": "^3.0.7",
    "ts-loader": "^4.1.0",
    "webpack": "^4.1.1",
    "webpack-cli": "^3.1.1",
    "webpack-dev-server": "^3.1.1"
  }

versions shown in manifest

<OfficeApp
          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
          xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
          xsi:type="TaskPaneApp">

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@kbrandl
Copy link
Contributor

kbrandl commented Dec 26, 2018

@ianchouinard sorry to hear that you've run into this problem; we'll look into this and respond on this thread when there's info to share.

@AlexJerabek - FYI since this issue relates to the Excel APIs, I've assigned it to you. Can you please investigate? Thanks!

@AlexJerabek
Copy link
Contributor

Thanks @kbrandl.

@ianchouinard, I checked in DefinitelyTyped and the current definitions file does have Range.dataValidation, as expected. I'll investigate the yo office build for Angular/TypeScript and report back what I find.

@AlexJerabek
Copy link
Contributor

Hi @ianchouinard,
I checked the yo office build and it's importing an old version of the types. If you go to node_modules/@types/office-js/index.d.ts, you'll see it's limited to Excel API set 1.3. I'm following up with the yo office team.
In the meantime, you can unblock your development by copying the latest definitions from DefinitelyTyped.
Please let me know if that lets you use data validation. Thanks!

@ianchouinard
Copy link
Author

That workaround worked for me. Thank you @AlexJerabek

@kbrandl
Copy link
Contributor

kbrandl commented Dec 29, 2018

Since this issue is a problem with the Yeoman Generator for Office Add-ins (and not with the Office Add-ins documentation), we're going to transfer this issue to the OfficeDev/generator-office repository (where issues related to the Yeoman Generator for Office Add-ins are tracked).

Tracking internally with 2762328.

@dmahugh dmahugh transferred this issue from OfficeDev/office-js-docs-pr Dec 29, 2018
@akrantz
Copy link
Collaborator

akrantz commented Dec 31, 2018

Pull request #397.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants