@@ -372,7 +372,11 @@ func (f *File) commentsWriter() {
372372// by given worksheet name and form control options. Supported form control
373373// type: button, check box, group box, label, option button, scroll bar and
374374// spinner. If set macro for the form control, the workbook extension should be
375- // XLSM or XLTM. Scroll value must be between 0 and 30000.
375+ // XLSM or XLTM. Scroll value must be between 0 and 30000. Please note that if a
376+ // cell link is set for a checkbox form control, Excelize will not assign a
377+ // value to the linked cell when the checkbox is checked. To reflect the
378+ // checkbox state, please use the 'SetCellValue' function to manually set the
379+ // linked cell's value to true.
376380//
377381// Example 1, add button form control with macro, rich-text, custom button size,
378382// print property on Sheet1!A2, and let the button do not move or size with
@@ -826,6 +830,9 @@ func (f *File) addFormCtrlShape(preset formCtrlPreset, col, row int, anchor stri
826830 if (opts .Type == FormControlCheckBox || opts .Type == FormControlOptionButton ) && opts .Checked {
827831 sp .ClientData .Checked = 1
828832 }
833+ if opts .FormControl .Type == FormControlCheckBox {
834+ sp .ClientData .FmlaLink = opts .CellLink
835+ }
829836 return & sp , sp .addFormCtrl (opts )
830837}
831838
0 commit comments