Разбираете файл и выводите
https://docs.microsoft.com/ru-ru/dotnet/api/docume...
using DocumentFormat.OpenXml.Packaging;
using System;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Spreadsheet;
namespace ExcelImport
{
public class ProjectEstimatesImport
{
private const string pkname = "CF_РТК";
private const string rtk = "ПК_РТК";
private const string importData = "Лист импорта данных";
public ProjectEstimatesImport(string fileName)
{
using (SpreadsheetDocument mySpreadsheet = SpreadsheetDocument.Open(fileName, false))
{
var sheets = mySpreadsheet.WorkbookPart.Workbook.Sheets;
foreach (Sheets sheet in sheets)
{
foreach (var attr in sheet.GetAttributes())
{
if (attr.Value == pkname)
{
;
}
else if (attr.Value == rtk)
{
;
}
else if (attr.Value == importData)
{
;
}
Console.WriteLine("{0}: {1}", attr.LocalName, attr.Value);
}
}
}
}
public object Result { get; private set; }
}
}