IRONSOFTWAREHOME
C#에서 Excel 집계 함수 마스터하기
using IronXL;
using System.Linq;

WorkBook workBook = WorkBook.Load("sample.xls");
WorkSheet workSheet = workBook.WorkSheets.First();

// Get range from worksheet
var range = workSheet["A1:A8"];

// Apply sum of all numeric cells within the range
decimal sum = range.Sum();

// Apply average value of all numeric cells within the range
decimal avg = range.Avg();

// Identify maximum value of all numeric cells within the range
decimal max = range.Max();

// Identify minimum value of all numeric cells within the range
decimal min = range.Min();
Imports IronXL
Imports System.Linq

Dim workBook As WorkBook = WorkBook.Load("sample.xls")
Dim workSheet As WorkSheet = workBook.WorkSheets.First()

' Get range from worksheet
Dim range = workSheet("A1:A8")

' Apply sum of all numeric cells within the range
Dim sum As Decimal = range.Sum()

' Apply average value of all numeric cells within the range
Dim avg As Decimal = range.Avg()

' Identify maximum value of all numeric cells within the range
Dim max As Decimal = range.Max()

' Identify minimum value of all numeric cells within the range
Dim min As Decimal = range.Min()
NuGet Download
PM > Install-Package IronXL.Excel
C#에서 Excel 집계 함수 마스터하기

C#에서 Excel 집계 함수 마스터하기

위의 코드 예제는 Excel 스프레드시트의 셀 범위에서 쉽게 집계 값을 얻는 방법을 보여줍니다. 그러나 숫자가 아닌 셀은 제외된다 점에 유의하세요.

Sum

메서드 Sum()는 선택한 셀 범위의 총 합계값을 반환합니다.

Average

메서드 Average()는 선택한 셀 범위의 평균값을 반환합니다.

Minimum

메서드 Min()는 선택한 셀 범위 중에서 최소값을 반환합니다.

Maximum

메서드 Max()는 선택한 셀 범위 중에서 최대값을 반환합니다.

위의 기능은 단일/다중 행이나 열에도 적용할 수 있어 더 많은 유연성을 제공합니다. 행 및 열 선택에 대해 더 알아보세요.

C#을 사용한 Excel의 수학 함수 탐색
GitHub에서 보기

시작할 준비 되셨나요?

Nuget Downloads 2,237,574버전:2026.9방금 출시

Key in blue circle

무료 30일 체험 키를 즉시 받으세요.

Your trial license will be sent to your email address

제한 없음. 100% 무제한 이용. 신용카드 불필요.

bullet_checked신용카드나 계정 생성은 필요하지 않습니다.제한 없음. 100% 무제한 이용. 신용카드 불필요.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
무료 라이브 데모를 예약하세요
Booking Badge

전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
Iron Software의 고객 로고
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.