Erstellen, bearbeiten, pruefen, berechnen und exportieren Sie Excel-Arbeitsmappen direkt aus Delphi- oder C++Builder-Code. HotXLS ist eine native Object-Pascal-Bibliothek fuer XLS und XLSX, entwickelt fuer Desktop-Tools, Batchauftraege, Berichte und Dokumenterzeugung ohne Microsoft-Excel-Automatisierung.
Dieser Artikel richtet sich an teams generating workbooks that carry reviewer notes, issue links, supporting evidence, or guided navigation. Er behandelt comments, hyperlinks, and review workflows als produktive Dokumenttechnik und nicht als kurzen Komponentenaufruf.
Das praktische Risiko besteht darin, dass review information becomes unreliable when comments, authorship, hyperlink targets, hidden sheets, and external URLs are not validated. Deshalb braucht der Ablauf einen schriftlichen Vertrag, nachvollziehbare Diagnosen und reale Regressionsdateien.
Architekturentscheidungen
Treat review data as structured workbook content. comment author, visibility, formatting, and whether generated notes are editable / internal sheet links, external URLs, file links, mail links, and disabled-link policy
- comment author, visibility, formatting, and whether generated notes are editable
- internal sheet links, external URLs, file links, mail links, and disabled-link policy
- review status vocabulary and where status is stored
- link validation, warning display, and blocked-domain handling
Implementierungsablauf
Validate links and comments before delivery. The order below keeps the workflow reviewable for Delphi and C++Builder teams.
- write comments from a structured review model rather than free-form strings
- validate hyperlink targets before saving the workbook
- connect internal links to stable sheets and named ranges where possible
- generate a review summary sheet when comments drive workflow decisions
- record link warnings and comment counts for support
Validierungsnachweise
Review evidence for operators and auditors. Keep these fields with the output or support record.
- comment count, author list, target cells, visibility state, and generated-note source
- hyperlink type, target, validation result, and blocked-domain reason
- review status values and summary-sheet totals
- warnings for links pointing to hidden, missing, or renamed sheets
Links and notes shape user decisions
Comments and hyperlinks guide users through the workbook. They should have clear authorship, stable cell references, validated targets, and a policy for internal sheet navigation versus external URLs.
Implementierungshinweise für die Produktion
Behandle HotXLS: comments, hyperlinks, and review workflows in Delphi als klaren Servicevertrag rund um die HotXLS-Aufrufe, mit getrennten Schritten für Eingabeprüfung, Arbeitsmappenaufbau, Ausgabekontrolle und Support-Evidenz
- Datenquelle, Zellbereiche und Ausgabeformat festlegen, bevor die Arbeitsmappe erzeugt wird
- Zeilenanzahl, Blattanzahl, Warnungen und Ausgabepfad in ein prüfbares Support-Protokoll schreiben
- Anwendungsspezifische Details in testbare Helper kapseln, statt sie in UI-Ereignissen zu verteilen
- Die gespeicherte Datei erneut öffnen oder prüfen, bevor sie an ein anderes System oder an Kunden geht
Fehlerfälle, die getestet werden sollten
- Ein erfolgreicher SaveAs-Aufruf beweist noch nicht, dass der fachliche Vertrag stimmt
- Schriftarten, Rechte und regionale Einstellungen können auf Servern anders sein als auf Entwicklerrechnern
- Logs dürfen keine Passwörter, Kundendaten oder internen Links offenlegen
Ausführliches Delphi-Beispiel
Das folgende Beispiel zeigt eine praktische Servicegrenze für dieses Thema und hält Policy, Logging und Validierung testbar getrennt
procedure BuildReviewWorkbook(const SourceFile, OutputFile: string);
var
Wb: TXLSXWorkbook;
Review: TReviewInventory;
begin
RequireFileExists(SourceFile);
Wb := TXLSXWorkbook.Create;
try
Wb.Open(SourceFile);
Review := ScanCommentsAndHyperlinks(Wb);
FlagUnsafeExternalTargets(Review);
AddReviewQueueSheet(Wb, Review);
AddReviewerInstructions(Wb, [
'Confirm unresolved comments',
'Verify external hyperlinks',
'Approve mailto and file links before delivery'
]);
AssertNoBlockedHyperlinks(Review);
WriteReviewAudit(Wb, Review);
if Wb.SaveAs(OutputFile) <> 1 then
RaiseWorkbookSaveError(OutputFile);
finally
Wb.Free;
end;
end;
Produktionscheckliste
- Run the workflow on an empty workbook, a normal customer workbook, and a worst-case workbook
- Open the output with the target spreadsheet application or downstream importer
- Log product version, template version, profile, row count, output path, elapsed time, and warning count
- Keep passwords, temporary files, customer data, and support bundles under explicit retention rules
- Add regression workbooks when a customer file exposes a new edge case