Winsoft OXML (Office XML) 2.4 for Delphi 5 -10.3 Rio Full Source
Winsoft OXML (Office XML) 2.4 for Delphi 5 -10.3 Rio Full Source
Delphi library for processing Excel .xlsx documents.
create or modify Excel Workbook .xlsx files
Microsoft Office installation is not required
uses Microsoft Open XML SDK and ClosedXML libraries
Microsoft .NET Framework 4.5 or higher required
available for Delphi 7 - 10.3
royalty free distribution in applications
How can I open existing .xlsx file?
Use XLWorkbookClass class:
var
WorkbookClass: XLWorkbookClass;
Workbook: XLWorkbook;
...
WorkbookClass := CoXLWorkbookClass.Create;
Workbook := WorkbookInstance.Create_5('example.xlsx');
...
How can I set workbook properties?
Workbook.Properties.Title := 'Title';
Workbook.Properties.Subject := 'Subject';
How can I set worksheet protection?
var
Worksheet: IXLWorksheet;
Protection: IXLSheetProtection;
...
Protection := Worksheet.Protect_3('password');
Protection.SelectLockedCells := False;
Protection.SelectUnlockedCells := False;
How can I solve "Class not registered." error message?
Create manifest file yourapplicationname.exe.manifest (change yourapplicationname accordingly to the name of your application):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="yourapplicationname" type="win32"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0"
publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity name="Winsoft.OfficeXML" version="2.2.0.0" publicKeyToken="c2371442b2cedf55" processorArchitecture="msil"/>
</dependentAssembly>
</dependency>
</assembly>
Embed yourapplicationname.exe.manifest file to your application: Select Delphi menu Project/Options.../Application. Change Manifest File combobox to Custom and select yourapplicationname.exe.manifest file in Custom manifest edit box.
Instead of embedding yourapplicationname.exe.manifest file to your application, you can comment "{$R *.res}" line in yourapplicationname.dpr file and use external yourapplicationname.exe.manifest file:
// {$R *.res}
Only for V.I.P
Warning! You are not allowed to view this text.