Questa funzione fa una pulizia della formattazione, eliminando eventuali bordi, allineamenti e colori.
Public Function sheetClear(myWorkbook As Workbook, mySheet As String)
With myWorkbook.Worksheets(mySheet)
.Cells.EntireColumn.AutoFit
.Cells.Borders.LineStyle = xlNone
.Cells.HorizontalAlignment = xlGeneral
.Cells.Interior.Pattern = xlNone
.Cells.Interior.TintAndShade = 0
.Cells.Interior.PatternTintAndShade = 0
.Cells.Font.ColorIndex = xlAutomatic
.Cells.Font.TintAndShade = 0
End With
End Function