Sets or returns whether ExcelWriter should remove macros from the generated workbook or leave them in.

 public boolean ExcludeMacros{ get; set; }
Public Property ExcludeMacros() As Boolean

When ExcludeMacro is set to true, buttons associated with macros may produce the error "Data may have been lost." Therefore, when excluding macros, remove all associated buttons from the spreadsheet. ExcelWriter, by default, will include macros in the generated workbook.


          //--- Get the ExcludeMacros value for the workbook
          bool exclude = wb.ExcludeMacros;

          //--- Set the ExcludeMacros value for the workbook
          wb.ExcludeMacros = true;
        

          '--- Get the ExcludeMacros value for the workbook
          Dim exclude As Boolean = wb.ExcludeMacros

          '--- Set the ExcludeMacros value for the workbook
          wb.ExcludeMacros = True