Excel Spreadsheet Autofill Range (Multiple rows) via MATLAB command

7 views (last 30 days)
Hi there!
I am working automating excel work flow and trying to get MATLAB to autofill a range in an Excel spreadsheet.
The range I am looking into is multiple rows in a column with various equations and the fuction would emulate selecting those rows in the column and autofilling the adjacent column with the equations by draging the "Plus" at the bottom right corner of the cell.
I ran into similar challanegs the memebers faced but the solution I found is unclear. Any help would be amazing.
Thank you!

Accepted Answer

dpb on 10 Aug 2022
Start by creating a macro that does what you want done and look at in in VBA -- I usually just paste it into the MATLAB editor as comments as my rosetta stone. Then look up the VBA doc for the methods referenced and translate from VBA syntax to COM, remembering there is no VBA compiler to translate named parameters nor autocomplete named constants -- you've got to do it all.
<Excel.range.autofill> is link to the method; there's link there to the named constants for type; you'll have to be able to set the range object from user input or program logic.
Oh...just noticed a previous <Answers/165083-autofill-range-in-excel-using-matlab> solved the problem for you already...that's one I hadn't yet needed.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!