Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:22:37+00:00 2026-06-09T08:22:37+00:00

I have an existing (opened and empty) file D:\api.xlsx and need to communicate with

  • 0

I have an existing (opened and empty) file “D:\api.xlsx” and need to communicate with it from Matlab.
First, I try to read values from A1:B2, and insert new values:

excelapp = actxserver('Excel.Application');
wkbk = excelapp.Workbooks;
wdata = wkbk.Open('D:\api.xlsx');
sheet = wdata.ActiveSheet;
range = sheet.get('Range', 'A1:B2');
range.Value
ans = 

    [NaN]    [NaN]
    [NaN]    [NaN]

range.Value = magic(2);
>> range.Value

ans = 

    [1]    [3]
    [4]    [2]

But I don’t see the changes in the excel. The range A1:B2 remains empty.
Similarly, when I manually insert new values into excel, the range.Value returns the old values.

So, there are two questions:

  1. How to insert values into an opened excel file from Matlab, so the new values become immediately visible?

  2. How to get into Matlab the updated (from Excel) values?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:22:39+00:00Added an answer on June 9, 2026 at 8:22 am

    actxserver will create a new, invisible copy of Excel, which you then need to load the file into, and explicitly make visible (you’ve discovered this, as your own answer makes clear).

    Alternatively, if you already have your file open in Excel, you can use actxGetRunningServer to connect to the running copy of Excel that is already visible with your file preloaded.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have existing Linux shared object file (shared library) which has been stripped. I
I have existing java code and need to create Design Document based on that.
I've just installed PyCharm, and have opened an existing project with multiple apps. When
I have an existing worksheet StudentSheet1 which I need to add as many times
We have an existing VB.net application. Upon an event, we need to open a
I recently opened an existing project from a time before I installed Xcode 4.1.
I have existing code that uses CMNewProfileSearch to find then iterate over the color
I have existing code with their own makefiles which I want to load into
I have quick question for you SQL gurus. I have existing tables without primary
I'm working on a project where the client wants to have existing pages dynamically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.