Coder Social home page Coder Social logo

Comments (10)

jipyua avatar jipyua commented on August 10, 2024

hi @hnyrxs2 this is a different issue with case #4463. If you add a sentence htmlTable.select() before htmlTable.set(defaultStyle); you will notice that there is a separate empty paragraph before the table. So apply "TableGrid" style to such as range is not correct, since this style can only apply to a whole table. As why there is an empty paragraph before the table, this is a behavior defined by Word itself which you can try by adding an empty content control and insert a table into it from UI.

In order to work around this, I think you can try to get the table inside the content control by ccContainer.tables.getFirst().set(defaultStyle);

from office-js.

hnyrxs2 avatar hnyrxs2 commented on August 10, 2024

Hello @jipyua thanks for the input. your workaround works for the gist i provided but we shall investigate further to the actual implementation on our add-in. But our implementation before works perfectly, is there any changes in the word behavior that caused this?

from office-js.

hnyrxs2 avatar hnyrxs2 commented on August 10, 2024

Hello again @jipyua your work around works but it compromises the performance of the add in as well as the whole MS word itself. It its taking minutes if i were to insert the table that would be 2 more pages, then the word crashes.

from office-js.

jipyua avatar jipyua commented on August 10, 2024

hi @hnyrxs2, thanks for trying the solution. From the above root cause analysis of your original issue, I don't think we have made changes of the behavior. Is it that you are trying to apply other non-table style to the range in the past? That way it will be always working.

About the new crash issue you mentioned, would you please share more information, such as your table code so that I can try to repro at my side and investigate what's happening?

from office-js.

4tti avatar 4tti commented on August 10, 2024

Hello @jipyua, there was definitely behavior change. Before - like 3-4 months ago - our solution worked just fine, then we noticed that there was exactly same error as here in #4463 and that's why @hnyrxs2 raised it there and because there was not answer this thread was created.

Thanks a lot for your help!

You can test it yourself I guess with some old build, let' say half year ago or so.
Edit: let us find time when it was working fine...
Edit2: It was workin fine (based on our test cases) in May

from office-js.

jipyua avatar jipyua commented on August 10, 2024

hi @4tti @hnyrxs2, thanks for providing further information, I tried the above code on a older build 16.0.17328.20514, but I still hit the same error. Could you please also have a try and explain more what's the behavior change you saw? Thanks.

from office-js.

hnyrxs2 avatar hnyrxs2 commented on August 10, 2024

hello @jipyua the only behavioral change we saw was the GeneralException thrown when updating html table style. Our original implementation of this was almost 2 years ago, and just recently around May when we are doing regression testing we noticed the failing functions with html table implementations without any changes made from these past months / year.

from office-js.

jipyua avatar jipyua commented on August 10, 2024

hi @hnyrxs2 , we will open an internal item to investigate this and see what's happening. At the same time, I suggest you use the work around to unblock you. Since there is only 1 table in the content contorl, the perf should be ok, if you see other unexpected cases, please let us know.

from office-js.

4tti avatar 4tti commented on August 10, 2024

@jipyua The performance is not ok. The performance went significantly down:

but it compromises the performance of the add in as well as the whole MS word itself. It its taking minutes if i were to insert the table that would be 2 more pages, then the word crashes.

from office-js.

4tti avatar 4tti commented on August 10, 2024

Any update please? @jipyua
Do you need something from us?

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.