Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save openize-com-gists/6c567da2b33e92c054aa557f827b0b46 to your computer and use it in GitHub Desktop.
Save openize-com-gists/6c567da2b33e92c054aa557f827b0b46 to your computer and use it in GitHub Desktop.
This C# example demonstrates retrieving and displaying built-in document properties from an Excel workbook using Openize.Cells SDK.
using System;
using Openize.Cells;
class Program
{
static void Main(string[] args)
{
string filePath = "/path/to/existing/spreadsheet.xlsx"; // Replace with the path to your file
// Open the existing workbook.
using (var workbook = new Openize.Cells.Workbook(filePath))
{
// Retrieve and display the document properties.
var properties = workbook.BuiltinDocumentProperties;
DisplayProperties(properties);
}
}
// Helper method to display document properties.
static void DisplayProperties(BuiltInDocumentProperties properties)
{
Console.WriteLine($"Author: {properties.Author}");
Console.WriteLine($"Title: {properties.Title}");
Console.WriteLine($"Created Date: {properties.CreatedDate}");
Console.WriteLine($"Modified By: {properties.ModifiedBy}");
Console.WriteLine($"Modified Date: {properties.ModifiedDate}");
Console.WriteLine($"Subject: {properties.Subject}");
Console.WriteLine("=================================");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment