Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
@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.
Any update please? @jipyua
Do you need something from us?
from office-js.
Related Issues (20)
- body.clear() not working for content controls HOT 3
- How to make slide active Or How to insert image using index HOT 4
- Addin sample not showing in new look outlook and browsers. HOT 5
- Identifying Usage of New Outlook in Office-js Add-ins HOT 1
- Not able to sideload outlook addin. in macbook there is no option to add the manifest file HOT 5
- Inserting Signature with the OnMessageSend event duplicates the signature
- The identity API is not supported for this add-in in online Word HOT 2
- Excel Online: calculation state can get stuck in Pending state when workbook contains charts HOT 3
- IP Address Range Needed for Microsoft Office Add-in Validation Process
- Office API messageParent Outlook on android doesn't work
- NAA: Unable to acquire access token for event-based activation (onMessageSend) HOT 2
- Outlook addin using Bootstrap modal or offcanvas bleeds through on Mac version of Outlook. Classic and New Outlook for Mac. HOT 2
- [Word API] Document.compare: ability to specify Original and Revised document?
- Outlook NAA issue: "Something went wrong. [7q6cl]" Error HOT 5
- Web Outlook provides improper attachment data if attachment is still uploading to the email HOT 2
- [Question] Is it safe to use `CustomFunctions.delayinitialization()`
- New Outlook - emails stuck in outlook at queued or draft status HOT 3
- context.application.createDocument works only first time HOT 1
- WorkBook level Define name is getting corrupted while reopening excel using base64
- In Outlook, getAllInternetHeadersAsync works on an item in the Inbox, but not the sent folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js.