FileInfo fileInfo = новый FileInfo(filePath);
строка DirectoryName = fileInfo.DirectoryName;
строка outputFileName = Path.GetFileNameWithoutExtension(fileInfo.Name) + «_wrapped» + fileInfo.Extension;
строка outputFilePath = Path.Combine(имя_каталога, имя_выходного_файла);
ExcelPackage.LicenseContext = OfficeOpenXml.LicenseContext.NonCommercial; // Set EPPlus license context
using (var package = new ExcelPackage(fileInfo)) // Load and process the Excel file
{
var worksheet = package.Workbook.Worksheets[0]; // Get the first worksheet
int rowCount = worksheet.Dimension.Rows; // Get the dimensions of the worksheet
int colCount = worksheet.Dimension.Columns;
Console.WriteLine("Wrapping text in all cells...");
for (int row = 1; row
Подробнее здесь: https://stackoverflow.com/questions/792 ... gth-actual
Мобильная версия