Office-js: When a sheet is named "New", WorksheetCollection#getItemOrNullObject returns a proxy object with 'isNullObject' set to true.

Created on 28 Jun 2018  路  6Comments  路  Source: OfficeDev/office-js


When a sheet is named "New", WorksheetCollection#getItemOrNullObject called with the string "New" sets Worksheet.isNullObject to true.

Expected Behavior

When a sheet named 'New' exists in the workbook, WorksheetCollection#getItemOrNullObject called with the argument "New" should return a proxy object whose 'isNullObject' property resolves to 'false' after calling context.sync()

Current Behavior

When a sheet named 'New' exists in the workbook, WorksheetCollection#getItemOrNullObject called with the argument "New" returns a proxy object whose 'isNullObject' property resolves to 'true' after calling context.sync()

Steps to Reproduce, or Live Example

https://gist.github.com/jcjolley/551c842688d2ca07978e27cd48a58585

Context

When a user names a sheet "New", the add-in throws an error when trying to operate on that sheet because it is, as far as office-js is concerned, a null object.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office Online]: PC desktop
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: Version 1805 (Build 9330.2124 Click-to-run)
  • Operating System: Windows 10 Pro 10.0.17134 Build 17134
  • Browser (if using Office Online): N/A
Excel product bug

Most helpful comment

Thanks for reporting the bug. We can repro it internally. We will make a fix soon.

All 6 comments

@jcjolley thanks for reporting this issue. I was able to repro. Very weird. btw it also reproes in excel Online.

internally tracking with 2412116

Thanks for reporting the bug. We can repro it internally. We will make a fix soon.

the issue was fix and in the process of been released.

@JuaneloJuanelo Thanks for the quick turn around!

@jcjolley btw this is part of our July Fork, you will be able to try it soon on insiders fast.

Was this page helpful?
0 / 5 - 0 ratings