Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
The most important changes involve the addition of a timestamp to the…
Browse files Browse the repository at this point in the history
… exported order sheet. This was achieved by creating a new variable, appending it to the sheet data, and adding a new cell with a formatted string indicating the current date and time.

Changes:
1. A new variable `timestamp` of type `Row` was added. This variable is crucial as it holds the timestamp data that will be appended to the order sheet.
2. The `timestamp` row was appended to `sheetData`. This step integrates the timestamp into the existing sheet data, ensuring it is included in the exported order sheet.
3. A new `Cell` was appended to `timestamp` with a `DataType` of `String` and a `CellValue` of a formatted string indicating the current date and time. The string states "This order sheet was exported on" followed by the current date and time in the format `yyyy-MM-dd HH:mm`. This change is the final step in adding a timestamp to the exported order sheet, providing a clear indication of when the order sheet was exported.
  • Loading branch information
Aloento committed Feb 7, 2024
1 parent de2e12e commit 9ebeec4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions SoarCraft.AwaiShop/AdminHub/Order/Export.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ public async IAsyncEnumerable<byte[]> ExportOrder() {
};
sheets.Append(sheet);

var timestamp = new Row();
sheetData.AppendChild(timestamp);
timestamp.Append(new Cell {
DataType = CellValues.String,
CellValue = new($"This order sheet was exported on {DateTime.Now:yyyy-MM-dd HH:mm}")
});

var headerRow = new Row();
sheetData.AppendChild(headerRow);
headerRow.Append(headers.Select(x => new Cell {
Expand Down

0 comments on commit 9ebeec4

Please sign in to comment.