Note that there are some explanatory texts on larger screens.

plurals
  1. POError using the User Defined function of Excel in Matlab
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10352577/excel-addin-error-name">Excel Addin Error #NAME?</a> </p> </blockquote> <p>I think it is a follow-up query to my earlier reported issue concerning User defined function in Excel. </p> <p>I am able to use the function in Excel when used Manually, but when I write to an excel file using Matlab using xlswrite, it gives an error <code>#NAME?</code> </p> <p><img src="https://i.stack.imgur.com/eh5Sp.jpg" alt="Using the function manually"></p> <p>I am attaching the screenshots of the both when entered manually and when using the function through Matlab.</p> <p><img src="https://i.stack.imgur.com/c37Jz.jpg" alt="Using xlswrite in Matlab"></p> <p>Thanks</p> <p>EDIT : </p> <p>Thanks a lot. I have stored the VBA function as an Excel addin here :</p> <p>C:\Users\Administrator\AppData\Roaming\Microsoft\Addins</p> <p>Here is what I saw about Excel Add-ins not loaded when used in Automation : </p> <p><a href="http://www.excelforum.com/excel-programming/472145-calling-excel-macro-from-vb-6-app-problem.html" rel="nofollow noreferrer">http://www.excelforum.com/excel-programming/472145-calling-excel-macro-from-vb-6-app-problem.html</a></p> <p>I am attaching the small snippet of the code from chi_squared() here : </p> <pre><code>Function Chi_Squared(act, exp, Optional df) </code></pre> <p>This is how I write to an excel file in Matlab :</p> <p>Formula_chisqr={[ '=chi_squared(' 'O2:O22' ',' 'M2:22' ')']};</p> <p>[status, message] = xlswrite1(ExcelFilename,Formula_chisqr,sheetname, Location_Agg);</p> <p>I also tried giving the complete path as suggested. But it did not work.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload