Why is .NET Sql Server faster than Excel Interop?

It may be a busy question and you can vote, but it completely disappoints me.

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

No matter what data access technology you use, ADO, ADO.NET, LINQ, Entity Framework, Astoria (ADO.NET Data Services), they are all faster than Excel automation.

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

WTF: Why is it better to talk to SQL Server than to talk to Excel? Excel is local, and Sql Server may not be.

Tia Chris

+3
source share
4 answers

Because creating a large monolithic executable file designed as an interactive application is slower than talking over a fast network with an application designed for this purpose.

+16
source

Each time you need to talk to excel, the server must run the excel program. This is on a hidden desktop, but it still runs the entire program. If you have multiple users using the site, these are also multiple instances of Excel. And if they use the same book, this is even worse.

Sql . . . Excel .

+6

Excel is still a joint intervention even in 2007, but there are many helpers

excel-performance-new-whitepaper-available

spreadsheetgear

excelpackage.codeplex

+2
source

This is because the SQL server is for server data, Excel is not. Network latency doesn't even come into play here until you get 1000, maybe even millions of rows from an SQL server

0
source

Source: https://habr.com/ru/post/1720828/


All Articles