Excel çalışma kitaplarını doğrudan Delphi veya C++Builder kodundan oluşturun, düzenleyin, inceleyin, hesaplayın ve dışa aktarın. HotXLS; Microsoft Excel otomasyonu olmadan masaüstü araçları, batch işleri, raporlama sistemleri ve sunucu tarafı belge üretimi için tasarlanmış, XLS ve XLSX iş akışlarına yönelik kaynak kodlu yerel bir Object Pascal kütüphanesidir.
Bu yazı teams receiving workbooks that must be inspected, classified, converted, or routed before processing için hazırlanmıştır. workbook audit and conversion workbench konusunu tek bir bileşen çağrısı olarak değil, üretim düzeyinde belge mühendisliği olarak ele alır.
Pratik risk şudur: conversion pipelines fail when macros, external links, hidden sheets, formulas, metadata, and unsupported features are not visible before save. Bu nedenle akışın yazılı sözleşmeye, gözlemlenebilir tanılara ve gerçekçi regresyon dosyalarına ihtiyacı vardır.
Mimari kararlar
Audit before converting. conversion targets such as XLSX, XLS, ODS, CSV, HTML, or PDF-like reports / macro, external-link, hidden-sheet, protection, and formula policies
- conversion targets such as XLSX, XLS, ODS, CSV, HTML, or PDF-like reports
- macro, external-link, hidden-sheet, protection, and formula policies
- feature preservation versus flattening versus blocking
- operator review states, warnings, and retained audit reports
Uygulama akışı
Use a feature inventory to choose conversion policy. The order below keeps the workflow reviewable for Delphi and C++Builder teams.
- open the workbook in audit mode and inventory sheets, metadata, formulas, links, and macros
- classify features into safe, warn, convert, preserve, or block
- show the operator a concise risk summary before conversion
- run the conversion with a named profile and capture feature-loss warnings
- compare key cells and workbook structure after conversion
Doğrulama kanıtı
Audit evidence for conversion decisions. Keep these fields with the output or support record.
- source format, sheet list, hidden-sheet count, macro presence, and external-link count
- formula, chart, image, protection, validation, and defined-name summary
- conversion profile, warning list, dropped-feature list, and output hash
- operator decision and support report path
Conversion is a risk decision, not only a file save
A workbench should show what the workbook contains before converting it. Operators need to know whether macros, links, hidden content, formulas, charts, or protection change the acceptable path.
Üretim uygulama notları
HotXLS: workbook audit and conversion workbench in Delphi konusunu HotXLS çağrılarının çevresinde açık bir servis sözleşmesi olarak ele alın; giriş doğrulama, çalışma kitabı yazma, çıktı denetimi ve destek kanıtını ayırın
- Çalışma kitabını oluşturmadan önce veri kaynağını, hücre aralıklarını ve çıktı biçimini belirleyin
- Satır sayısı, sayfalar, uyarılar ve çıktı yolunu incelenebilir destek kaydına yazın
- Uygulamaya özel ayrıntıları UI olaylarına değil test edilebilir helper'lara yerleştirin
- Dosyayı başka sisteme veya müşteriye vermeden önce kaydedilmiş çıktıyı yeniden açın veya inceleyin
Prova edilmesi gereken hata kipleri
- Başarılı SaveAs çağrısı iş sözleşmesinin doğru kaldığını kanıtlamaz
- Sunucu ile geliştirici makinesinde yazı tipleri, izinler ve bölgesel ayarlar farklı olabilir
- Loglar parola, müşteri verisi veya iç bağlantı açığa çıkarmamalıdır
Ayrıntılı Delphi örneği
Aşağıdaki Delphi örneği bu konu için pratik bir servis sınırı gösterir ve politika, günlükleme ve doğrulamayı test edilebilir katmanda tutar
procedure ConvertWorkbookWithAudit(const InputFile, OutputFile: string; const Profile: TConversionProfile);
var
Wb: TXLSXWorkbook;
BeforeState: TWorkbookInventory;
AfterState: TWorkbookInventory;
begin
RequireFileExists(InputFile);
Wb := TXLSXWorkbook.Create;
try
Wb.Open(InputFile);
BeforeState := CaptureWorkbookInventory(Wb);
ApplyConversionProfile(Wb, Profile);
WriteConversionAuditSheet(Wb, BeforeState, Profile);
if Wb.SaveAs(OutputFile) <> 1 then
RaiseWorkbookSaveError(OutputFile);
AfterState := InspectSavedWorkbook(OutputFile);
AssertConversionResult(BeforeState, AfterState, Profile.RequiredSignals);
ArchiveConversionEvidence(InputFile, OutputFile, BeforeState, AfterState);
finally
Wb.Free;
end;
end;
Üretim kontrol listesi
- 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