How can I create a custom excel function using matlab ?

5 ビュー (過去 30 日間)
Sarada Prasanna Sahoo
Sarada Prasanna Sahoo 2020 年 10 月 8 日
編集済み: Sarada Prasanna Sahoo 2020 年 10 月 17 日
Madam/Sir,
I want to use the fuction needed only in excel platform.
Let it be considered that few cells of two or more sheets will be taken as input argument of a function. And the output will be returned in another cell.
for example
'B7' cell of sheet1, 'C8' cell of sheet2 , 'D9' cell of sheet3 will be taken as input argument of a custom function named 'mywork_function'. The output of 'mywork_function' output will release its output in 'B8' cell of sheet1.
This function named 'mywork_function' should have been written in matlab environment.
Please help.
If possible please release a video explaining this problem to my mail id sarada@iiit-bh.ac.in
  1 件のコメント
Rik
Rik 2020 年 10 月 14 日
You're joking, right?

サインインしてコメントする。

回答 (1 件)

Uday Pradhan
Uday Pradhan 2020 年 10 月 14 日
Hi Sarada,
You can use Spreadsheet Link to call MATLAB functions from Microsoft Excel. Firstly, check if Spreadsheet Link is installed by running
>> license ('test','excel_link')
on your MATLAB command line. If the answer is 1, then follow the following steps else check the previous link for installation guidance.
  1. Open Microsoft Excel and go to “Add – ins”. If you don’t have “Spreadsheet link” in the available Add – ins section. Click on Browse.
2. In the Browse window, navigate to the Spreadsheet link add – in (this is generally available at matlabroot/toolbox/exlink). Choose the add – in file “excllink”.
3. Now you can call MATLAB functions from Excel. Right Click on any empty cell on your worksheet and navigate to MATLAB > MATLAB function wizard.
You can now refer to this documentation page : Find Custom MATLAB function from MATLAB function wizard in Excel to see how can we access custom functions from Excel and then for steps to execute that function please see this link. While entering input arguments to the custom function you must use the format: Sheet1!$B$6 which indicates the cell B6 in sheet 1. Similarly, use the "Optional Output Cell(s)" section in the Function arguments window to display the result in a specified cell of any sheet
Hope this helps!
  1 件のコメント
Sarada Prasanna Sahoo
Sarada Prasanna Sahoo 2020 年 10 月 16 日
編集済み: Sarada Prasanna Sahoo 2020 年 10 月 17 日
It is a good one. But unfortunately my problem still remains unsolved.
I have attached few screenshots. Probably you can understnad my problem and suggest an appropriate solution.
The first screenshot is the simple function
The second photograph shows the function arguments is not allowing me to input arguments.
I do not understand the problem.
But
The problem I have mentioned on 8th Oct : - Can it be solved using Matlab library compiler ?
In one of the videos I have seen, the instructor is explaining about it. The link has been mentioned below.
The screenshot of the video is attached herewith.
Is it possible to solve in this manner ?
Which toolbox is needed for this and how to execute it ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by