เอกสาร HotXLS

เวิร์กโฟลว์เวิร์กบุ๊กขั้นสูง

คู่มือนี้จัดกลุ่ม API ระดับสูงขึ้นซึ่งมีประโยชน์มากที่สุดเมื่อเวิร์กโฟลว์ของ Workbook มีความซับซ้อนมากกว่าการอ่านและเขียนเซลล์ทั่วไป

เอาต์พุต PDF ที่พร้อมพิมพ์

การส่งออก PDF ของเวิร์กบุ๊ก, เวิร์กชีต และช่วงข้อมูลสำหรับ XLS แบบคลาสสิกและ XLSX แบบใหม่ จะแสดงผลค่าที่จัดรูปแบบ, การเติมสีเซลล์, สีและเน้นฟอนต์, การจัดตำแหน่ง, เส้นขอบ, เส้นตารางเสริม, ความกว้างคอลัมน์, ความสูงแถว, การตัวแบ่งหน้าด้วยตนเอง, ชื่อเรื่องการพิมพ์ซ้ำ และหัวกระดาษ/ท้ายกระดาษแบบสามส่วน

Sheet.PageSetup.PrintArea := 'A1:H80';
Sheet.PageSetup.PrintTitleRows := '$1:$3';
Sheet.PageSetup.RightHeader := 'Page &P of &N';
Sheet.HPageBreaks.Add(45);
Workbook.SaveAsPDF('report.pdf');

Modern workbooks expose the same direct entry points through TXLSXWorkbook, TXLSXWorksheet, and TXLSXRange

ModernSheet.PrintArea := '$A$1:$H$80';
ModernSheet.PrintTitleRows := '$1:$3';
ModernSheet.AddRowBreak(45);
ModernWorkbook.SaveAsPDF('modern-report.pdf');

ข้อความนอกกลุ่ม WinAnsi จะถูกเขียนด้วยฟอนต์ TrueType CID ที่ฝังตัวและแผนผัง ToUnicode เพื่อให้โปรแกรมอ่านสามารถแสดงผลและดึงข้อความ Unicode ออกมาได้

Set TXLSPDFExport.UnicodeFontFile when a workbook needs a particular script or corporate typeface, otherwise the exporter selects a suitable installed font when available

ความคืบหน้า, การยกเลิก และการวินิจฉัย

Use OnProgressEx for begin, work, and end callbacks and set its abort argument to cancel an operation

Inspect Diagnostics or LastDiagnostic after save, open, or recalculation failures instead of relying only on a numeric return value

ส่วนของแพ็กเกจ OOXML ที่ไม่รองรับ

TXLSXWorkbook.PreserveUnsupportedParts มีค่าเริ่มต้นเป็น true และรักษาความปลอดภัยในส่วนที่กำหนดเองที่สามารถเข้าถึงผ่าน root, workbook, worksheet หรือความสัมพันธ์ของภาพวาดที่ไม่รู้จัก

UnsupportedPartCount and UnsupportedPartBytes report retained content, while ClearUnsupportedParts intentionally removes it before a save

การแลกเปลี่ยนข้อมูลคลิปบอร์ดแบบสมบูรณ์

Call range-level CopyToClipboard to publish both Unicode tabular text and CF_HTML, including display formatting, formulas, merged cells, links, and safely quoted embedded delimiters

การแก้ไขซอร์สโค้ด VBA

After loading a VBA project, update an existing module's SourceCode and save the workbook or standalone storage

ตัวเขียนจะบีบอัดใหม่เฉพาะสตรีมต้นทางที่แก้ไขเท่านั้น โดยยังคงเก็บส่วนนำหน้าสตรีมและเนื้อหาโปรเจกต์ที่ไม่มีการเปลี่ยนแปลงเอาไว้

ตัวควบคุมฟอร์มแบบคลาสสิก

CheckBox := Sheet.AddCheckBox('Approved', 2, 2, 3, 5);
ComboBox := Sheet.AddComboBox(5, 2, 6, 5);
ListBox := Sheet.AddListBox(8, 2, 12, 5);

Wrapper ประเภทที่ส่งคืนจะเปิดเผยป้ายกำกับ, ประเภทการควบคุม, แองเคอร์, การแจงนับ และการลบ

Selective format patches

Target.ApplyFormatPatch(Source, [xfpFont, xfpFill, xfpNumberFormat]);

ช่วงข้อมูลต้นทางที่เล็กกว่าจะวางเรียงต่อกันบนเป้าหมายที่ใหญ่กว่า และการจัดรูปแบบที่ไม่ถูกเลือกพร้อมกับค่าปลายทางทั้งหมดจะไม่มีการเปลี่ยนแปลง

การส่งออกชุดข้อมูลแบบ Master-detail

Enable TDataToXLS.ReadDetailTables to export linked detail datasets below every master record and enable IndentDetailTables to add one column of indentation per relationship level

WordArt

Shape := Sheet.AddWordArt('HotXLS', 'textArchUp', 2, 2, 6, 8);
Shape.TextColor := $FF00A060;
Shape.OutlineColor := $FF17365D;

แองเคอร์ DrawingML ที่สมบูรณ์จะยังคงอยู่หลังจากการเปิดและบันทึกในรอบต่อ ๆ ไปผ่านเส้นทางการรักษาภาพวาดดิบ (raw drawing preservation)

See Demo\Delphi\FeatureShowcase for a compact executable example that combines PDF printing, form controls, format patches, and WordArt