Код: Выделить всё
using OfficeOpenXml;
using OfficeOpenXml.Drawing.Chart;
class Program
{
static void Main()
{
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
var stream = new MemoryStream();
using (var package = new ExcelPackage())
{
var worksheet = package.Workbook.Worksheets.Add("Sheet1");
// Add headers for the data
worksheet.Cells["A1"].Value = "Date";
worksheet.Cells["B1"].Value = "Value";
// Define the start and end dates
DateTime startDate = new DateTime(2023, 1, 1);
DateTime endDate = new DateTime(2024, 1, 1);
// Add records for each day between the start and end dates
int row = 2;
for (DateTime date = startDate; date
Мне нужно показать только последнее значение в серии.
[img]https://i.sstatic.net/WxqfjJow .png[/img]
Я нашел пример, примененный в VB.
Подробнее здесь: [url]https://stackoverflow.com/questions/78758545/how-can-i-display-the-last-data-label-of-a-series-within-a-line-chart-in-net-wi[/url]