1

We are using Excel Add-in side loaded for our application. I am trying to Set a Cell Value in Excel with Base64 Encoded content (that has formatted content). I see example of how set base64 encoded image but not the text content with formatting. I am able to insert simple text with below code but could not find a way to set base64 content into a cell.

I am looking at Office Js Excel https://learn.microsoft.com/en-us/javascript/api/excel/excel.range?view=excel-js-preview

Excel.run(async (context) => {
var activeCell = context.workbook.getActiveCell(); // get current active cell
activeCell.load(['address', 'values']);
await context.sync();

let newRange = activeCell.getOffsetRange(0,1); // right of the current cell where base64 content must be inserted
newRange.load(['values']);
await context.sync();
 
newRange.values = insert base 64 content??

I greatly appreciate any pointers you may have

3
  • 2
    Office JS do not support at this moment, would you please share a bit more on your scenario? therefore we can discuss what we can do to support you with existing API. thanks. Commented Jun 16, 2021 at 2:16
  • 1
    Thanks for your response. We have several docx contents (with bullets, bold, color text, tables, etc) stored as base64 encoded string in database. I am trying to programmatically insert these base64 strings into the cell. I am able to successfully insert docx base 64 into word via side loaded Add-in but cannot in excel so far. Thanks in advance Commented Jun 16, 2021 at 2:26
  • For word I am using method: insertFileFromBase64 Commented Jun 16, 2021 at 2:45

1 Answer 1

0

Office Js current do not support set cell value from base 64 string, I have created a backlog (5193490) for this feature internally, would you please submt your request on this site and upvote your request? thanks.

https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform

Sign up to request clarification or add additional context in comments.

2 Comments

Is there a timeline of when this may be available?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.