Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
Links are showing blocked content when insert excel in current context using insertWorksheetsFromBase64

Currently I have created one excel Addin in which I am selecting one template excel in file upload and using insertWorksheetsFromBase64 method to import all sheets from template to current workbook.

    let myFile = document.getElementById("file");
    let reader = new FileReader();

    reader.onload = (event) => {
        Excel.run((context) => {
            // Remove the metadata before the base64-encoded string.
            let startIndex = reader.result.toString().indexOf("base64,");
            let externalWorkbook = reader.result.toString().substr(startIndex + 7);
                
            // Retrieve the current workbook.
            let workbook = context.workbook;
                
            // Set up the insert options. 
            let options = { 
                sheetNamesToInsert: [], // Insert all the worksheets from the source workbook.
                positionType: Excel.WorksheetPositionType.after, // Insert after the `relativeTo` sheet.
                relativeTo: "Sheet1" // The sheet relative to which the other worksheets will be inserted. Used with `positionType`.
            }; 
                
             // Insert the new worksheets into the current workbook.
             workbook.insertWorksheetsFromBase64(externalWorkbook, options);
             return context.sync();
        });
    };
    
    // Read the file as a data URL so we can parse the base64-encoded string.
    reader.readAsDataURL(myFile.files[0]);

But after this all cell links in inserted sheets showing blocked content like shown in image Error Screenshot

As per my understanding it is not updating cell reference as per current excel. Can someone please help how can i update reference as well.

Update After clicking on continue get below error

Error aftr continue

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think it is by design(it is a security warning), when you upload the workbook which contains the external cell reference, and then open the workbook in excel online, you will also see the same message. You could just click the "Enable content" to continue.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!