views:

171

answers:

4

This might be a loaded question, and it might get voted down, but it completely frustrates me.

When you use SQL Server in your development the data access is fast and efficient, but when you use COM to talk to Excel it is piggy slow.

It doesn't matter what data access technology you use, ADO, ADO.NET, LINQ, Entity Framework, Astoria (ADO.NET Data Services), they are all quicker than automating Excel.

If all you want is the data in cell "A1" from a Workbook, you need an Excel.Application, Excel.Workbook, Excel.Worksheet, and Excel.Range objects, just to get one data point.

WTF, Why is talking to SQL Server more efficient than talking to Excel? Excel is local and Sql Server may not be.

TIA Chris

+16  A: 

Because spinning up a big monolithic executable that was designed as an interactive application is slower than talking over a fast network to an application that was designed for the purpose.

Joe
A: 

This is becuase SQL server is designed to server data, Excel is not. Network latency won't even come into play here until you are retreiving 1000's maybe even millions of rows from SQL server

andrewWinn
+6  A: 

Every time you need to talk to excel, the server has to actually start up the excel program. It's in a hidden desktop, but it's still starting up the entire program. If you have several people using the site, that's also several instances of Excel. And if they're sharing the same workbook it's even worse.

Sql Server, on the hand, is already running. Just connect and go. It was built for this kind of thing. Excel wasn't.

Joel Coehoorn
Friends don't let friends use Excel as a database.
HLGEM
+2  A: 

Excel is still a com interop, even in 2007. but there is many helpers

excel-performance-new-whitepaper-available

spreadsheetgear

excelpackage.codeplex

astander
Thanks, I'm now evaluating alternatives!
Chris