c# 如何通过Sheet名获取sheet

2024-12-01 14:35:44
推荐回答(1个)
回答(1):

推荐excel读写组件Aspose.Cells.dll
string Path = MapPath("Excel.xls");
Workbook wb = new Workbook();
wb.Open(Path);
Worksheet ws = wb.Worksheets["sheet名"];//也可以是序号如:wb.Worksheets[0]
就写这么多了,剩下就工作你再慢慢研究吧