Coder Social home page Coder Social logo

Comments (6)

microsoft-github-policy-service avatar microsoft-github-policy-service commented on September 14, 2024

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

from office-js.

shanshanzheng-dev avatar shanshanzheng-dev commented on September 14, 2024

Hi @NiteshParmarCoh Thanks for reporting this issue. But when I copy your provided code using script lab, and click run button, nothing is happened. Could you please help to provide more details about code in order for us to better repro or investigation?
image

from office-js.

NiteshParmarCoh avatar NiteshParmarCoh commented on September 14, 2024

Please import the below code in the script lab.

description: ''
host: EXCEL
api_set: {}
script:
  content: >
    $("#create-custom-xml-part").on("click", () =>
    tryCatch(createCustomXmlPart));


    async function createCustomXmlPart() {
      await Excel.run(async (context) => {
        const originalXml = "<Reviewers><Reviewer>test</Reviewer></Reviewers>";
        const customXmlPart = context.workbook.customXmlParts.add(originalXml);
        const xmlBlob = customXmlPart.getXml();
        await context.sync();
        console.log("xmlBlob.value:", xmlBlob.value);
      });
    }


    async function tryCatch(callback) {
      try {
        await callback();
      } catch (error) {
        console.error(error);
      }
    }
  language: typescript
template:
  content: "<section class=\"samples ms-font-m\">\n\t<button id=\"create-custom-xml-part\" class=\"ms-Button\">\n        <span class=\"ms-Button-label\">Create XML part</span>\n    </button>\n</section>"
  language: html
style:
  content: |
    section.samples {
        margin-top: 20px;
    }

    section.samples .ms-Button, section.setup .ms-Button {
        display: block;
        margin-bottom: 5px;
        margin-left: 20px;
        min-width: 80px;
    }
  language: css
libraries: |
  https://appsforoffice.microsoft.com/lib/1/hosted/office.js
  @types/office-js

  [email protected]/dist/css/fabric.min.css
  [email protected]/dist/css/fabric.components.min.css

  [email protected]/client/core.min.js
  @types/core-js

  [email protected]
  @types/[email protected]

from office-js.

shanshanzheng-dev avatar shanshanzheng-dev commented on September 14, 2024

Hi @NiteshParmarCoh, Thanks for this details. I can repro this, the excel Api set operation can't redo/undo. It's a by-design behavior. Also please go to community to vote on undo support: Undo to help accelerate it! We value your feedback and will consider it in our future feature reviews.‌

from office-js.

microsoft-github-policy-service avatar microsoft-github-policy-service commented on September 14, 2024

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

from office-js.

microsoft-github-policy-service avatar microsoft-github-policy-service commented on September 14, 2024

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

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.