Last active
March 3, 2025 15:12
-
-
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.
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 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