OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
673 stars 95 forks source link

Formatting lost while loading worksheet using base64. #4940

Open Jayshiv1408Dev opened 1 week ago

Jayshiv1408Dev commented 1 week ago

My Environment Platform : PC desktop Host: Power Point Office version number: Microsoft® PowerPoint® for Microsoft 365 MSO (Version 2404 Build 16.0.17531.20140) 64-bit Operating System: Windows 11 pro

Hi team, While loading excel using base64 using insertWorksheetsFromBase64 formatting is not retaining . I'm attaching code snippets ,Expected output and Error output image. Here is script Lab code InsertWorksheet.txt

My Excel File Testing.xlsx

Error output image

Expected Output image

EsterBergen commented 1 week ago

@Jayshiv1408Dev -- Are you loading the table in PowerPoint or Excel? Looks like excel to me from the screen shot. Please confirm.

Jayshiv1408Dev commented 1 week ago

@EsterBergen Yes in excel.I'm loading attached workbook in Excel .

qinliuMSFT commented 6 days ago

Hi @Jayshiv1408Dev , I tried your code snippet but could not reproduce. Here are the steps I took to try to reproduce, could you correct me if I am doing it wrong?

  1. Download the Testing.xlsx you attached.
  2. Copy your code snippet into Script Lab and run.

The result: Three sheets identical to the existing sheets were created. After comparing them one by one, they are the same. image image image

We would be very grateful if you could try the above steps again, or point out where there is a discrepancy with your steps, so that we can have a solid repro step to help us with our investigation. Thank you for your assistance.

Jayshiv1408Dev commented 5 days ago

@qinliuMSFT Thanks for your response. But I'm still facing same issue is there anything related Excel version.

Here is my cdn file https://appsforoffice.microsoft.com/lib/1/hosted/office.js

Excel version Screenshot image

Here is my demoVideo. https://github.com/user-attachments/assets/6d3f63f9-f08d-4b23-9a81-c06b492ce07d

qinliuMSFT commented 5 days ago

Thanks @Jayshiv1408Dev for your additional information. I can now reproduce this issue when running script on a new created file. It has been put on our backlog #9418386, the team will investigate and we will reply to you as soon as there is progress.