Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Export to excel with multiple Blank Columns

Author  Topic 

wrathyimp
Starting Member

14 Posts

Posted - 2011-08-21 : 06:43:56
Hi,

I need to add blank columns when exporting Data to excel.
I need to have two blank columns with no header names after some columns with data.

When using SPACE (20) AS [ ], i am getting error:
"' ' is not a valid name. Make sure it does not include invalid characters"

I am using DTS wizard to export to excel.
How can i fix it?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-21 : 06:49:24
you cant have space alone as header name you need to give it some place holder names.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

wrathyimp
Starting Member

14 Posts

Posted - 2011-08-22 : 02:54:50
But How can I have a Blank (empty) Column in my Excel Sheet.
Any other workarounds?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-22 : 03:14:15
you can have column with blank data but not its header as blank. any reason why you dont need to give it a header?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

wrathyimp
Starting Member

14 Posts

Posted - 2011-08-22 : 04:13:53
Client got an application with imports from a Excel Sheet, the excel sheet has two blank/empty columns.
This sheet is manually done.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-22 : 04:37:44
so arent you able to add headers using some macro?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

wrathyimp
Starting Member

14 Posts

Posted - 2011-08-22 : 05:31:54
was Just focusing on SQL output, but seems i rather do it in Excel.
This will increase an additional step in process.
Go to Top of Page
   

- Advertisement -