Last active
December 21, 2021 02:02
-
-
Save anakahala/d7cee31d8d4270464278873b63f1f56b to your computer and use it in GitHub Desktop.
ClosedXMLSample2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using ClosedXML.Excel; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ClosedXmlSample | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string cellValue = ""; | |
| using (var book = new XLWorkbook(@"C:\work\sample.xlsx")) | |
| { | |
| var sheet = book.Worksheet(1); | |
| var firstCellUsed = sheet.FirstCellUsed(); | |
| cellValue = firstCellUsed.Value.ToString(); | |
| } | |
| Console.WriteLine(cellValue); | |
| Console.ReadLine(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment