IRONSOFTWAREHOME
C#에서 Excel 범위 정렬하기
from ironxl import *

# Load the Excel workbook
workbook = WorkBook.Load("sample.xlsx")
worksheet = workbook.DefaultWorkSheet

# Select a range
selected_range = worksheet["A1:D20"]

# Select a column(B)
column = worksheet.GetColumn(1)

# Sort the range in ascending order (A to Z)
selected_range.SortAscending()

# Sort the range by column(C) in ascending order
selected_range.SortByColumn("C", SortOrder.Ascending)

# Sort the column(B) in descending order (Z to A)
column.SortDescending()

# Save changes with the sorted range and column
workbook.SaveAs("sortExcelRange.xlsx")
pip install ironxl
C#에서 Excel 범위 정렬하기

C#에서 Excel 범위 정렬하기

데이터를 알파벳 순서 또는 숫자 순서로 정리하면 분석이 실용적이고 효율적입니다. IronXL for Python을 사용하면 엑셀의 열, 행 및 범위를 최소한의 코드로 쉽게 정렬할 수 있습니다.

어떤 선택된 범위나 열에서라도 SortAscending 또는 SortDescending 메서드를 사용하여 원하는 순서로 정렬을 적용하세요. SortByColumn 메서드는 두 개의 매개변수가 필요합니다. 첫 번째는 정렬할 열이고, 두 번째는 정렬 순서입니다.

Python으로 엑셀의 이름이 지정된 범위 사용하는 법 배우기

시작할 준비 되셨나요?

버전: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일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.