image thumbnail

Excel Macro Example: Sun Rise, Set, Transit, Twilight

version 1.0.1 (58.2 KB) by Meg Noah
to demonstrate writing inputs and reading outputs from an xlsm spreadsheet


Updated 21 Feb 2020

View License

The purpose of this project is to demonstrate how to interact with an Excel xlsm file to write inputs and read outputs from the Excel calculation. For this example, the matlab code sets the inputs of location and time, and reads the values calculated by the spreadsheets: Sun's rise, set, transit, and twilight.

The download includes the spreadsheet xlsm files. The xlsm extension is the spreadsheet that enables visual basic macros. The .BAS file and a text file explaining how to create your own calculator spreadsheet is included in the download.

Cite As

Meg Noah (2021). Excel Macro Example: Sun Rise, Set, Transit, Twilight (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!