Convert arff to xls

Convert ARFF to XLS

Convert Weka ARFF datasets to legacy XLS with Weka, LibreOffice, online services, or Python.

Make XLS files online

We can't read ARFF files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into XLS:

How to convert arff to xls file

Microsoft Excel, a legacy reporting system, or a recipient’s spreadsheet software may require an .xls workbook instead of an ARFF dataset. Converting the data allows spreadsheet editing and sharing, but the ARFF schema and machine-learning metadata need separate preservation.

What the ARFF format is

ARFF (Attribute-Relation File Format) is a text-based dataset format associated with the Weka machine-learning platform. A file normally contains a relation name, an @attribute declaration for each field, an @data section, and optional comments.

ARFF supports numeric, nominal, string, date, and relational attributes. It also supports sparse rows, in which only non-default values are stored. ARFF is common in Weka projects, university courses, academic datasets, and data-mining workflows.

What the XLS format is

XLS is Microsoft Excel’s binary workbook format for Excel 97–2003. It stores tabular data in worksheets and supports formulas, formatting, filters, charts, and spreadsheet editing.

XLS remains useful for legacy applications or recipients that reject XLSX. Each worksheet is limited to 65,536 rows and 256 columns, so larger datasets should use XLSX, CSV, or a database. XLS also has practical cell-size and compatibility limits that can truncate or alter unusually long values.

Convert with Weka and LibreOffice

  1. Install Weka from its official website and LibreOffice from libreoffice.org.
  2. Open Weka and choose Explorer → Preprocess → Open file, then select the .arff file.
  3. Check the displayed attribute names, instance count, class attribute, and missing-value count.
  4. Use the Preprocess panel’s Save control and select CSV output. Save the result as dataset.csv. Weka reads the ARFF declarations and expands sparse instances before writing ordinary rows.
  5. Open dataset.csv in LibreOffice Calc. In the import dialog, choose the actual delimiter, usually comma, and enable quoted-field handling. Set columns containing identifiers, long numbers, or codes to text when automatic type detection would change their values.
  6. Check dates, missing values, delimiters inside quoted strings, Unicode characters, and the first-row field names. Choose File → Save As, select Excel 97–2003 (*.xls), and accept the legacy-format warning.

This two-stage method is safer than renaming the extension: Weka parses ARFF syntax, while Calc creates a real XLS workbook. It does not preserve Weka filters, class-selection settings, comments, or the original relation declaration.

Use an online converter

Services such as CloudConvert and Zamzar can be considered for non-confidential files, but ARFF support and available output formats can change. Before uploading, confirm that the service’s current format selector explicitly lists ARFF as the input and XLS as the output; do not assume that a service supporting CSV or XLSX also supports ARFF.

Upload the file, choose XLS, run the conversion, download the workbook, and open it in LibreOffice or Excel to inspect row counts, headers, dates, missing values, and special characters. Check the provider’s retention and deletion policy first; do not upload personal, confidential, or regulated records to a generic conversion service.

Automate the conversion with Python

For repeatable jobs, parse ARFF with an ARFF-aware library instead of treating it as an ordinary CSV file. The following example uses liac-arff to read the schema and xlwt to write the legacy XLS format:

pip install liac-arff xlwt
import arff
import xlwt

with open("dataset.arff", "r", encoding="utf-8") as source:
    parsed = arff.load(source)

book = xlwt.Workbook()
sheet = book.add_sheet("data")
headers = [name for name, _ in parsed["attributes"]]

for column, name in enumerate(headers):
    sheet.write(0, column, name)

for row_number, row in enumerate(parsed["data"], start=1):
    for column, value in enumerate(row):
        if isinstance(value, bytes):
            value = value.decode("utf-8", errors="replace")
        sheet.write(row_number, column, "" if value is None else value)

book.save("dataset.xls")

Test the script on representative data first. Library behavior can differ for ARFF dates, missing values, nominal labels, quoted strings, sparse rows, and relational attributes. The script also inherits XLS’s row and column limits.

Quality and compatibility checks

  • ARFF declarations are schema metadata, not spreadsheet formatting. Field names and values usually transfer, but comments, relation names, Weka filters, class settings, and category definitions do not automatically become XLS features.
  • ARFF missing values are commonly written as ?. A CSV importer or script may instead produce blank cells or null values; choose and verify the intended representation before analysis.
  • Nominal attributes become ordinary cell values. Their permitted-value lists and ordering are not reliably preserved unless you document or recreate them with spreadsheet validation.
  • Sparse rows are expanded into full spreadsheet rows, which can increase file size substantially.
  • Relational attributes contain nested data and cannot be represented faithfully in one flat worksheet. Export them separately or retain the original ARFF.
  • Strings beginning with =, +, -, or @ may be interpreted as formulas or other spreadsheet expressions. Import untrusted string fields as text and inspect the resulting workbook.
  • Keep the original .arff file as the authoritative dataset when schema, comments, nominal declarations, or machine-learning reproducibility matter.

ARFF vs XLS: format comparison

How the ARFF and XLS formats compare on the properties that matter most for this conversion.

Comparison of the ARFF and XLS file formats
Property .ARFF Attribute-Relation File Format .XLS Microsoft Excel Spreadsheet
Open standard Partly open No
Compression Uncompressed Both
Typical file size Small Medium
Opens in a web browser Partial Partial
Further editing Easy Limited
Metadata support Basic Basic
Plain-text readable Yes No
Best used for Data exchange Data exchange
Introduced — 1987
Developer University of Waikato / WEKA project Microsoft
MIME type text/arff application/vnd.ms-excel

The database currently does not contain any direct arff file converter links.

Frequently asked questions

Will ARFF attributes and data types be preserved in XLS?

The columns and cell values are usually transferred, but ARFF-specific type definitions, nominal value lists, relation metadata, and sparse-data notation may not be preserved. Some attributes can appear as general text or numeric spreadsheet cells instead of retaining their original Weka meaning.

Will missing values in an ARFF file stay missing in XLS?

Missing-value markers are commonly converted to blank cells, but a converter may also import them as text. Check the result before using spreadsheet formulas or analysis, because blanks and text markers behave differently.

Can a large ARFF dataset be converted to legacy XLS?

Only if the dataset fits within the older XLS worksheet limits; otherwise the conversion may fail or omit rows or columns. Large ARFF files may need to be split or saved in another spreadsheet format.

Is an ARFF-to-XLS conversion reversible?

It is not fully reversible because XLS does not retain all ARFF schema information, comments, sparse representation, or Weka-specific metadata. The result is an editable table, but converting it back may require rebuilding the ARFF header and data types.