
Learn to integrate Excel with Python using xlwings to run Python scripts from Excel for dashboards. Explore numpy, pandas, seaborn, and matplotlib for data science and visualization in Excel.
Learn how xlwings lets python developers and data scientists use pandas, scikit-learn, and numpy in excel. The course splits into two parts with a tailor-made python crash course appendix.
Master the course by following seven tips to maximize learning, explore the overview and prerequisites, and use the AI assistant, questions and answers, and hands-on coding exercises without skipping sections.
Compare xlwings with the new Python in Excel feature, noting they offer different capabilities; practice using them together to maximize Excel-powered data science and finance workflows.
discover how to download and install the Anaconda distribution to set up Python for data science, machine learning, and algo trading with Jupyter notebooks and IDEs.
Learn to use the Anaconda Navigator to launch Jupyter Notebook, work in the base environment, run cells with Shift+Enter or Alt+Enter, and view installed packages like NumPy and pandas.
Explore how to work with Jupyter notebooks, including edit and command modes, running cells, markdown with text and images, headers, and keyboard shortcuts, plus kernel management.
Download and unzip the xlwings resources, open the first steps Jupyter notebook, and use the case study one, test two Excel files and the Titanic CSV to practice.
Learn how to install xlwings, the free open-source Python library for Excel integration, verify installation with conda list or pip install xlwings, and note that Anaconda pre-installs xlwings (version 0.994).
Learn to use xlwings as a data viewer to export numpy arrays and pandas dataframes to Excel for easy inspection, including viewing full datasets and handling csv data.
The data viewer update adds a table parameter to the view method; when a pandas data frame is passed, it formats as an Excel table by default, enabling sorting.
Learn to connect to an Excel workbook with xlwings, read values from and write values to sheets, and manage new, unsaved, and saved books in a Jupyter workflow.
Learn to read and write single values with xlwings across strings, numbers, and datetime objects, using cells (A1, B1) or 1-based indices, then clear contents when needed.
Learn how named ranges create robust, relative references in Excel, keeping values accessible as you reorganize sheets, and improving Python code reliability.
Learn to write Excel functions with Python using xlwings, creating workbooks, inserting Python-powered formulas into cells, and reading either values or formulas to track dynamic references like A1 and B1.
Explore range shortcuts in xlwings to write and read values fast, but favor the range method for readability; use sheet index or slice notation only in rare, one-line cases.
Showcases Excel as a front end and Python as the analytics backend using xlwings and NumPy financial to compute future value with compound interest via named ranges and udfs.
Explore xlwings to connect python and excel by creating and manipulating a workbook, sheets, named ranges, and reading and writing values, including summing numbers and using excel links.
Learn how to write values vertically with xlwings by using transpose equals true, overcoming the default horizontal write, starting at cell A7 to fill top down from the list L2.
Learn how xlwings reads Excel data into Python as one-dimensional or two-dimensional nested lists by using ndim, distinguishing rows from columns.
Learn to read excel tables with xlwings by selecting ranges like a1 to c3 and obtaining row lists. Transpose results and know when to use numpy arrays or pandas dataframes.
Learn how xlwings expand reads dynamic ranges in Excel by expanding from A1 to the right, down, or to the full table, using the expand and options methods.
Explore writing two dimensional structures with nested lists in xlwings, and see how numpy arrays and pandas dataframes support table-like data in Excel, including starting at A4 and A7.
Explore a real estate investment case study by building an Excel model and running a Monte Carlo simulation with Python and xlwings to generate 10,000 scenarios and analyze risk.
Explore the real estate excel model with input and calculation sheets, detailing investment financing, lease terms, inflation, loan amortization, and projected equity cash flows.
Examine equity cash flows of a real estate investment: 45 million initial outlay, annual rents and costs, 10-year exit, and investment multiple and IRR, plus Monte Carlo planning with xlwings.
Learn to run a simple Monte Carlo simulation in Python with xlwings, modeling real estate returns using normal inflation, price factor, and cost distributions, and analyzing mean, median, and risk.
Explore an advanced Monte Carlo simulation in Excel using Python and xlwings, modeling independent annual inflation and costs over ten years across 10,000 trials to estimate investment multiple and IRR.
Restores the base calculation after Monte Carlo runs by applying fixed references to D20 and D40 with xlwings, and replacing formulas on input and calculation sheets.
Discover how Xlwings enables running Python scripts in Excel, compare run main and run Python, and prepare with installation tips, troubleshooting, and starter download files.
Install the xlwings add-in using the recommended command in either Anaconda prompt or terminal, then enable the developer ribbon and configure conda paths and environments for Excel integration.
Master running a Python function from Excel with xlwings using Run Main. Ensure the script name matches the workbook and define a main function that writes to cell A2.
Troubleshoot xlwings in Excel by consulting official docs, adjusting the add-in, and resolving not found or runtime error 53 through Conda paths and the Python interpreter.
Create and run a simple VBA sub procedure to insert Hello VBA into the active cell using the VBA editor and modules, then save as a macro-enabled workbook.
Demonstrate running Python scripts from Excel using xlwings run Python, including calling a Python function via vba and importing modules. Configure xlwings references and the python path.
Evaluate run main versus run python in xlwings: run main is simple but restrictive; run python is flexible but requires vba, macro-enabled workbooks, and varied paths and names.
Convert Jupyter notebooks to .py files and run them from Excel using xlwings, organizing code into a main function and executing from the workbook.
Download the Jupyter notebook and Excel workbook, preview the Monte Carlo simulation in Excel with run and restore buttons, and plan to integrate with xlwings to run Python.
Automate the Monte Carlo simulation with RunPython from Excel and Jupyter, adjusting CPI, PPF, and costs, and view mean, median, and shortfall risk.
Integrate Monte Carlo simulation in Excel using xlwings and RunPython by converting a notebook to a Python module and wiring visual basic for applications procedures to run and restore results.
Create a Matplotlib plot in Python, simulate a million heights from a normal distribution (mean 70, sd 4), visualize a histogram, and embed the figure in Excel with xlwings.
Learn to update a matplotlib histogram in Excel using xlwings by replacing the figure with sheet.pictures.add and update=true, add a title, axis labels, a median line, and seaborn styling.
Learn how to create a histogram, insert an xlwings picture into Excel, and adjust its size, position, and aspect ratio using left, top, height, width attributes and range-based positioning.
Set a picture's position and size in xlwings using left top and scale, placing at B2 with 0.6 scale. Note the drawback: size updates require deleting and re-adding the picture.
Embed Seaborn plots into an Excel workbook using xlwings, showing a histogram with a kernel density estimator and a rug plot from a 1000-sample height study, plus a median line.
Learn to create native Excel charts with Python and xlwings, setting source data from column a and creating a line or area chart. Adjust the chart’s position and size.
Build a stock dashboard in Excel powered by Python analysis using pandas, NumPy, Statsmodels, Seaborn, Matplotlib, and Yahoo Finance data, computing beta via regression for daily, weekly, or monthly returns.
Load historical price and volume data from Yahoo Finance via the Yahoo Finance API using a finance library as a replacement for the pandas data reader.
Analyze Microsoft stock performance during the covid-19 crisis with Python and Jupyter, using Pandas data reader from Yahoo Finance and benchmarking against the Dow Jones Index via daily close.
Compare Microsoft stock to the Dow Jones index using normalization to a base value, analyzed with daily and monthly returns and correlation in pandas.
Analyze the beta factor with a linear regression of stock returns and benchmark returns, extracting slope, r-squared, and confidence intervals.
Organize code into a main function, load stock data from the Excel workbook, create charts and metrics, and prepare the Python file for the stock dashboard (part 2).
Learn how xlwings uses the options method to customize reading Excel data, including transpose, numbers as int or rounded with lambda, and empty cell handling, numpy arrays and pandas dataframes.
learn to read excel data into python as a dictionary using the xlwings dictionary converter, and write dictionaries to excel with transpose orientation and range expansion.
Demonstrates the dataframe converter with xlwings and pandas, reading an Olympic CSV dataset of over 30,000 rows, writing to Excel, and reading back with configurable index and headers.
discover how to use xlwings to write pandas DataFrames to Excel with index and header control, read data back with index handling, and apply auto fit to columns.
Explore data science workflows with xlwings to inspect and manipulate data frames in Excel, including dropping columns, reordering with reindex, and renaming headers for efficient analysis.
Convert pandas series using xlwings and Excel. Write and read series with optional index, index names, and header handling, using the athlete and medal examples from the Summer Olympics dataset.
Learn how to import data from Excel into Pandas using read_excel, convert it to a dataframe, set an index, manage headers, and selectively import columns with usecols.
Import and customize excel data with pandas using pd.read_excel, selecting sheets by name or index, skipping initial rows, and setting relevant usecols.
Learn to import financial time series from Excel into pandas with read_excel, create a date-time index, select columns via usecols, and export to csv or excel.
Discover how xlwings lets you use Python functions as Excel UDFs, available on Windows with a one-time setup. Download materials and follow troubleshooting videos.
Complete one-time Excel preparations to use xlwings and define your first two udf functions, hello and square root. Import functions, decorate with xlwings, and know when to reimport after changes.
Master how xlwings finds and imports Python modules and functions in Excel by changing the module name and path, and by updating the Python path and settings.
Understand how xlwings generates vba wrappers for Python UDFs and how importing functions links Python to Excel, while avoiding vba keyword conflicts that cause automation error 440.
Explore advanced xlwings udfs by applying the @xw.arg decorator to convert inputs into a two-dimensional list, with converters and ndim handling single values, rows, columns, and tables from Excel.
Create numpy user defined functions with xlwings by converting inputs to numpy arrays using the arguments decorator and summing with numpy's sum method across rows, columns, or single cells.
Explore creating user defined functions that return multi-cell arrays in excel using numpy and xlwings, covering array formulas, dynamic arrays, and handling rows and columns.
Learn how to create dynamic arrays with xlwings UDFs, using the dynamic array decorator and expand equals true to spill results, even without native Excel dynamic arrays.
Create pandas-based UDFs to read tables into dataframes, apply element-wise operations like sum and plus one, and return either a single value or a dataframe using expand equals table.
Add docstrings to your xlwings-powered python functions to clarify purpose and arguments, documenting the square root udf and its integer or float inputs with triple-quoted descriptions and argument decorators.
Excel vs. Python - what is the best tool for Data Science, Business, and Finance?
The answer is: Use Excel and Python together and integrate both tools with xlwings. Get the best of two worlds!
With xlwings, you can use Python Data Science libraries like Numpy, Pandas, Scipy, Matplotlib, Seaborn, and Scikit-learn directly in Excel! You can run Python code in Excel and boost your Excel projects! More and more Professionals and Developers use
Excel as Frontend
Python as analytical Backend.
This course is the perfect choice for
Experienced Python Coders: Use Excel as Graphical User Interphase (GUI) | Run your Python scripts with Excel | Present your results with Excel Dashboards
Excel Users and complete Python Beginners: Boost your Excel projects with clean and powerful Python code!
Mixed Groups: Non-Coders can run and use Python code simply by clicking on buttons in Excel.
Why take this course?
You will learn and master the xlwings library from scratch
For Excel Users and complete Python Beginners: This course includes a Python Crash Course that is tailor-made for you!
It´s the most comprehensive and practical (hands-on) xlwings course on the web
It covers three comprehensive real-world projects.
Project 1: You will learn how to boost your financial model in Excel by adding a Python Monte Carlo Simulation - Run your Excel calculation 10,000 times with different sets of inputs and analyze the results!
Project 2: You will learn to create Bloomberg-like Stock Dashboard Apps with Excel (Graphical User Interface) and Python (analytical Backend).
Project 3: You will learn how to use Pandas methods and functions on your datasets directly in Excel.
Why use Excel?
There is no better Graphical User Interface (GUI) and Reporting tool than Excel. Excel is
widely spread (750 million users)
standardized
intuitive to use
most users are well-trained
it requires low/zero setup
it requires low/zero maintenance
and it´s still the best choice for financial models & spreadsheet calculations
Why use Python?
With hundreds of powerful Libraries, Python is the first choice for Data Science, Machine Learning, and advanced analytics in Business and Finance. The Python Ecosystem is way more powerful and versatile than VBA. And it´s cleaner and easier to learn and apply!
Why learn and master xlwings?
xlwings is the perfect tool to integrate Excel and Python! xlwings allows you to
Automate Excel from Python e.g. to produce reports or to interact with Jupyter Notebooks.
Write macros in Python that you can run from buttons in Excel, e.g. to load data from a database or an external API.
Write UDFs (user-defined functions) and leverage the power from NumPy, Pandas, and machine learning libraries.
Leverage Python's scientific stack for interactive data analysis using Jupyter Notebooks, NumPy, Pandas, scikit-learn, etc.
Use xlwings to automate Excel reports with Python.
Write Excel tools with Python instead of VBA and call your code directly from within Excel, e.g. via a button on the sheet.
This also works great for prototyping web apps.
Write (array) UDFs in a breeze by taking advantage of all the functionality already available in libraries like NumPy and Pandas.
Dynamic array formulas are supported.
As always, there is no risk for you as I offer a 30-day money-back guarantee. I am looking forward to seeing you in the course!
(Mac users are welcome! However, please note that 10%-15% of the course content (UDFs) is currently unavailable on Mac!)