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

[Back] SharedStringTable #103

Merged
merged 2 commits into from
Feb 7, 2024
Merged

[Back] SharedStringTable #103

merged 2 commits into from
Feb 7, 2024

Conversation

Aloento
Copy link
Owner

@Aloento Aloento commented Feb 7, 2024

No description provided.

…se the OpenXML SDK for generating Excel files, the addition of a SharedStringTablePart to the workbook part of the Excel file, and the inclusion of user information for each record. The code now also handles cases where the order tracking number is null or empty and includes comments for each order.

1. The code has been refactored to use the OpenXML SDK to generate an Excel file. This change allows the code to directly create cells with the appropriate data type and value, improving efficiency and accuracy.

2. A SharedStringTablePart has been added to the workbook part of the Excel file. This part is used to store strings that are shared across multiple cells in the Excel file, reducing redundancy and improving performance.

3. A new method `shared` has been added. This method checks if a given text already exists in the SharedStringTablePart and either returns the index of the text or adds the text to the SharedStringTablePart and returns the new index. This method is used to add shared strings to the Excel file.

4. The code now includes user information (name, email, phone, and address) for each record. This change provides more comprehensive data for each record in the Excel file.

5. The code now handles the case where the order tracking number is null or empty. This change ensures that all cells have a value, improving the consistency of the data.

6. The code now adds a cell with the comments for each order. This change provides more detailed information for each order in the Excel file.
… 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.
@Aloento Aloento self-assigned this Feb 7, 2024
@Aloento Aloento merged commit 3dcafe7 into master Feb 7, 2024
1 check passed
@Aloento Aloento deleted the Dev branch February 7, 2024 18:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant