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

Table.sort.reapply() crashes Excel #25

Closed
Rick-Kirkham opened this issue Nov 5, 2017 · 3 comments
Closed

Table.sort.reapply() crashes Excel #25

Rick-Kirkham opened this issue Nov 5, 2017 · 3 comments
Assignees
Labels
Area: Excel Issue related to Excel add-ins Status: under investigation Issue is being investigated Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs

Comments

@Rick-Kirkham
Copy link
Contributor

Rick-Kirkham commented Nov 5, 2017

Expected Behavior

Table has been sorted. User changes one or more cell values in the sort-on column, so the table rows are no longer in the proper sort order. Code calls myTableObject.sort.reapply(). The table is resorted on the existing criteria so it is again in desired sort order.

Current Behavior

When myTableObject.sort.reapply() runs, Excel crashes. There is no error message.

Steps to Reproduce, or Live Example

  1. Create an add-in (or Script Lab snippet) that
    A. Calls myTableObject.sort.clear();
    B. Loads the TableSort object with myTableObject.load('sort');
    C. Calls context.sync
    D. Calls myTableObject.sort.reapply();
  2. Assign the function to a button.
  3. Create a table (manually or with code, doesn't matter) with 2 or more columns and rows. One column has text values that are NOT in alphabetical order.
  4. Sort the column in Z-A order.
  5. Change one of the column values so that it is out of order alphabetical order.
  6. Click the button.

Excel crashes.
The crash won't happen unless you call myTableObject.sort.clear(); before you call myTableObject.sort.reapply();. But Excel should not crash.

Context

I'm creating an Excel.js tutorial.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office Online]: PC desktop
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: 1712 8731,1000 Click to Run
  • Operating System: Win 10
  • Browser (if using Office Online): N/A
@sumurthy
Copy link
Contributor

This is under investigation.

@sumurthy sumurthy added Area: Excel Issue related to Excel add-ins Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs Status: under investigation Issue is being investigated labels Nov 15, 2017
@sumurthy sumurthy self-assigned this Nov 15, 2017
@JuaneloJuanelo
Copy link

i think this does not happen anymore. scriptlab used:
https://gist.github.com/JuaneloJuanelo/9d0a4fe3c5e2f427289bda44442df04a

if you still repro reopen and adjust the sample so its reproable.

@Rick-Kirkham
Copy link
Contributor Author

Doesn't repro anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Excel Issue related to Excel add-ins Status: under investigation Issue is being investigated Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests

3 participants