With version 5 April, the
xlsHotlink macro works now just fine

A little warning: All macros that write to Excel, whether VBA or XLA or MasmBasic, do
not preserve the previous state, i.e.
there is no undo. If you really need undo, use
xlsRead$("yourselection") and handle it manually.
include \masm32\MasmBasic\
MasmBasic.inc ;
download Init xlsConnect ; no args=Excel, System
.if
!Zero?
; non-zero means success
xlsOpen "\Masm32\RichMasm\Res\LifeExOecd.xls"
; we open a sample spreadsheet
.if
!Zero?
; non-zero signals success ; xlsCommand "[app.activate()]"
; optional: activate Excel
xlsConnect "LE Males at birth"
; tell Excel to which sheet you want to talk .if
!Zero?
; non-zero signals success .if rv(GetConsoleWindow)
; you may print to the console... ConsoleColor cBlack, cYellow
; make the spaces visible that Excel exports Print "Current selection=[",
xlsRead$(), "]", CrLf$
; no args means current selection .else
ifdef hEdit
; this section would be typical for a GUI application SetWin$ hEdit='R1C1:R9C5=['+
xlsRead$("R1C1:R9C5")+']'+CrLf$
; ... or set window content AddWin$ hEdit="Extract #2=["+
xlsRead$('R9C1:R12C5')+"]"+CrLf$
; and add bits & pieces xlsHotlink "R5C1:R38C2", hEdit
; see how user modifies a selected area endif
.endif
; writing is possible but attention, there is no undo (as for all modifications done by Excel macros) xlsWrite "R1C1",
Cat$("This sheet was modified on "+Date$+", "+Time$)
.endif
xlsClose 0
; close the file without saving (0=don't save, 1=save, no arg: ask) .endif
xlsDisconnect ; say bye to Excel .endif
Inkey "ok"
Exitend start