0
votes

When I run Execute SQL Task to create an xlsx file, the file's "Always create backup" option is always enabled in the Save As > Tools > General Properties options (where you can set a password to open or modify and set as read-only). This causes "Backup of ..." files to be created anytime the file is saved.

Execute SQL Task properties:
    TimeOut: 0
    CodePage: 1252
    TypeConversionMode: Allowed
    ConnectionType: EXCEL
    SQLSourceType: Direct input
    SQLStatement: CREATE TABLE no_backup ([testing] LONGTEXT, [no auto] LONGTEXT)

EXCEL Connection Manager Properties:
    ConnectionString: Provider=Microsoft.ACE.OLEDB.12.0;
                      Data Source=C:\FILEPATH\FILENAME.xlsx;
                      Extended Properties="Excel 12.0 XML;HDR=YES";
    ExcelVersionNumber: 4

When creating a xlsx file manually in Excel, this option is not enabled. I cannot find settings or properties to make this the default in SSIS.

Is there a way to set the connection string or properties somewhere to create xlsx files with "Always Create Backup" DISABLED so multiple files aren't generated everytime an original file is saved?

1

1 Answers

0
votes

Looks like SSIS creating Excel documents always sets this way. No way to change it.
Only way to prevent it is create a template file with the correct settings and copy to a new named file each time.