I have the following problem. I'm exporting to an Excel 2003 file (has to be Excel 2003) from SQL Server through SSIS. It first creates a sheet through a SQL Task and then populates it with a SQL Data Flow. The Excel connection specifies that the first row has the column names.
The problem I have is that when the sheet only has one column, SSIS starts writing not in row 2, but row 3.
This is the SQL script that creates the sheet:
CREATE TABLE `Sheet1` (`Column` LongText)
And the script that populates it:
SELECT socialSecNum FROM Users
If I add a dummy column, with name ".", and in the DataFlow fill it with blanks, it doesn't skip that row, and starts writing in row 2.
The SQL Task script that creates the sheet in this case is:
CREATE TABLE `Sheet1` (`Column` LongText, `.` LongText)
It's the same SQL script that fills the Excel file in both screenshots. The output doesn't change, so there isn't a NULL value being inserted randomly at the beginning there.
What is going on? How do I avoid it? I can't have that "." column name there.
EDIT: Also note that it's not that the Excel files are dirty and that's why it leaves an empty row in row 2 because it thinks it's being used; the same file doesn't skip a row if I add a second column in the script.
EDIT2: I was asked to remove the pictures, sorry.