War3Net.IO.Slk
6.0.1
dotnet add package War3Net.IO.Slk --version 6.0.1
NuGet\Install-Package War3Net.IO.Slk -Version 6.0.1
<PackageReference Include="War3Net.IO.Slk" Version="6.0.1" />
<PackageVersion Include="War3Net.IO.Slk" Version="6.0.1" />
<PackageReference Include="War3Net.IO.Slk" />
paket add War3Net.IO.Slk --version 6.0.1
#r "nuget: War3Net.IO.Slk, 6.0.1"
#:package War3Net.IO.Slk@6.0.1
#addin nuget:?package=War3Net.IO.Slk&version=6.0.1
#tool nuget:?package=War3Net.IO.Slk&version=6.0.1
War3Net.IO.Slk
About
War3Net.IO.Slk is a .NET library for reading and writing SLK (Symbolic Link/SYLK) files, a spreadsheet format used by Warcraft III to store game data such as unit properties, abilities, and UI configuration. It is part of the War3Net modding library.
Key features
- Parse SLK files into in-memory table structures
- Serialize tables back to SLK format
- Query columns by header name for easy data access
- Combine multiple tables with join operations
- Support for multiple data types (strings, integers, floats, booleans)
- Efficient row-wise iteration with LINQ support
- Automatic table size optimization with shrink operations
How to Use
Parse an SLK file
using War3Net.IO.Slk;
// Parse an SLK file from a stream
using var stream = File.OpenRead("UnitUI.slk");
var table = new SylkParser().Parse(stream);
// Access table dimensions
Console.WriteLine($"Columns: {table.Columns}, Rows: {table.Rows}");
Access cells by column name
using War3Net.IO.Slk;
var table = new SylkParser().Parse(stream);
// Find column index by header name (first row contains headers)
int unitIdColumn = table["unitUIID"].Single();
int shadowColumn = table["buildingShadow"].Single();
// Iterate through data rows (skip header row at index 0)
foreach (var row in table.Skip(1))
{
string unitId = (string)row[unitIdColumn];
string shadow = row[shadowColumn] as string;
if (!string.IsNullOrEmpty(shadow))
{
Console.WriteLine($"Unit {unitId} has shadow: {shadow}");
}
}
Create and serialize a table
using War3Net.IO.Slk;
// Create a new table with dimensions
var table = new SylkTable(3, 4); // 3 columns, 4 rows
// Set header row
table[0, 0] = "ID";
table[1, 0] = "Name";
table[2, 0] = "Value";
// Set data rows
table[0, 1] = "A001";
table[1, 1] = "First Item";
table[2, 1] = 100;
// Serialize to a stream
using var output = File.Create("output.slk");
new SylkSerializer(table).SerializeTo(output, leaveOpen: false);
Combine two tables
using War3Net.IO.Slk;
var unitsTable = new SylkParser().Parse(unitsStream);
var abilitiesTable = new SylkParser().Parse(abilitiesStream);
// Join tables on matching column values
var combined = unitsTable.Combine(
abilitiesTable,
thisColumn: "unitId",
otherColumn: "abilityUnit");
Main Types
The main types provided by this library are:
War3Net.IO.Slk.SylkParser- Parses SLK file streams into table objectsWar3Net.IO.Slk.SylkTable- In-memory representation of a tabular spreadsheet with cell access and query operationsWar3Net.IO.Slk.SylkSerializer- Serializes table objects back to SLK format
Related Packages
- War3Net.Build - Generate JASS map scripts and compile maps
- War3Net.Build.Core - Parsers and serializers for war3map files
- War3Net.IO.Mpq - Read and write MPQ archives
Feedback and contributing
War3Net.IO.Slk is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Disclaimer
This README was generated with the assistance of AI and may contain inaccuracies. Please verify the information and consult the source code for authoritative details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net5.0
- War3Net.Common (>= 6.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on War3Net.IO.Slk:
| Package | Downloads |
|---|---|
|
War3Net.Build.Core
Parsers and serializers for war3map files. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.1 | 183 | 2/1/2026 |
| 6.0.0 | 191 | 1/25/2026 |
| 5.8.1 | 946 | 9/12/2025 |
| 5.8.0 | 222 | 9/6/2025 |
| 5.6.1 | 7,499 | 1/7/2023 |
| 5.6.0 | 1,022 | 12/20/2022 |
| 5.5.6 | 2,420 | 11/30/2022 |
| 5.5.5 | 944 | 11/13/2022 |
| 5.5.3 | 1,212 | 10/29/2022 |
| 5.5.2 | 1,046 | 10/25/2022 |
| 5.5.0 | 2,133 | 8/20/2022 |
| 5.4.0 | 4,589 | 2/13/2022 |
| 0.1.3 | 4,721 | 11/24/2021 |
| 0.1.2 | 548 | 10/31/2021 |
| 0.1.1 | 599 | 10/27/2020 |
| 0.1.0 | 690 | 9/14/2020 |
| 0.1.0-preview1 | 609 | 4/12/2020 |