Koen Verbeeck (3/4/2014)
I'm not sure you can read Excel with bcp (you can write to Excel with bcp though).
You can use FROM OPENROWSET to read an excel file, or just use SSIS (with is the same as the import wizard).
I don't know of anyway that BCP can write to an Excel file. I know it can write to a CSV or TSV file, which Excel attaches and Excel icon to in Explorer, but it's not an actual Excel file. If you know of a way to write to an actual .xlsx or .xls file from BCP, I'm all ears. (and no... not being sarcastic... I've just never heard of such a thing and would like to learn the method if there's a way).
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs