anchor.diff:      FDBGrid.DataSource.DataSet.DisableControls;
       try
         tmpFields := FDBGrid.DataSource.DataSet.Fields;
  +      col := 0;
         for i := 0 to tmpFields.Count - 1 do
         begin
  -        MyWorksheet.WriteText(0, i, tmpFields[i].DisplayLabel);
  -        MyWorksheet.WriteBackgroundColor(0, i, $00D0D0D0);
  +        if tmpFields[i].Visible then
  +        begin
  +          MyWorksheet.WriteText(0, col, tmpFields[i].DisplayLabel);
  +          MyWorksheet.WriteBackgroundColor(0, col, $00D0D0D0);
  +          inc (col);
  +        end;
         end;
   
         rn := FDBGrid.DataSource.DataSet.RecNo;
  
positive.code:   MyWorkbook: TsWorkbook;
    MyWorksheet : TsWorksheet;
    tmpFields : TFields;
    i, rn, row : integer;
  begin
    MyWorkbook := TsWorkbook.Create;
    try
  
negative.code:   SUnableToWriteFileMessage = 'Unable to write file. Check if the file is open by another application. If so, close it and run this command again.';
    SConfirmFileOverwriteCaption = 'Confirm';
    SConfirmFileOverwriteMessage = 'The selected file already exists. Overwrite it?';
    SWantToOpenFileMessage = 'Do you want to open the file?';
  
  type
  
  