Skip to content

Instantly share code, notes, and snippets.

@fileformat-cells-gists
Last active August 28, 2024 10:15
Show Gist options
  • Save fileformat-cells-gists/9cfdc960fe09d5f24ec53b5f990c232c to your computer and use it in GitHub Desktop.
Save fileformat-cells-gists/9cfdc960fe09d5f24ec53b5f990c232c to your computer and use it in GitHub Desktop.
This C# example showcases how to get Column Heading from a MS Excel worksheet in C# using FileFormat.Cells SDK
using FileFormat.Cells
string filePath = "Z:\\Downloads\\testFile1.xlsx";
// Load the workbook from the specified file path
using (Workbook wb = new Workbook(filePath))
{
Worksheet firstSheet = wb.Worksheet[0];
string columnHeading = firstSheet.GetColumnHeading("B");
Console.WriteLine("Column Heading");
Console.WriteLine(columnHeading);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment