Convert XLS to ARFF
Prepare an XLS worksheet for Weka by exporting CSV, checking attribute types, and saving ARFF.
Convert XLS files online
We don’t have a dedicated online converter for XLS to ARFF yet, but you can convert XLS files online to these and more formats:
How to convert xls to arff file
- Other formats
- No ratings yet.
Weka commonly uses ARFF when spreadsheet data must be loaded as a machine-learning dataset with declared attributes and values. The conversion is usually triggered by preparing an Excel table for Weka Explorer, Experimenter, KnowledgeFlow, or Weka-based code.
What XLS contains
XLS is the binary Microsoft Excel 97–2003 workbook format. Microsoft Excel, LibreOffice Calc, Apache OpenOffice Calc, and business reporting systems can open or create it.
An XLS workbook can contain several worksheets, formulas, charts, formatting, merged cells, notes, hidden rows, and multiple unrelated tables. ARFF represents one data table, so isolate one rectangular range with a single header row before conversion.
Legacy XLS worksheets are limited to 65,536 rows and 256 columns. .xlsx is a different XML-based Excel format; changing an .xlsx filename to .xls does not convert it.
What ARFF contains
ARFF (Attribute-Relation File Format) is Weka's text dataset format. Its header defines a relation and attributes, followed by a @data section containing records.
ARFF can declare numeric, nominal, string, date, and relational attributes. A simple dataset might contain @relation customers, @attribute age numeric, @attribute churn {yes,no}, and then @data with comma-separated values.
Its main advantage over a spreadsheet is that the dataset schema is stored with the values. The file is plain text, can be version-controlled and inspected in a text editor, and does not retain workbook-specific presentation features.
Convert through CSV and Weka
The most dependable desktop workflow is to export the required worksheet as CSV and save it as ARFF from Weka 3.8. This avoids differences between Weka installations' Excel/Spreadsheet loader support and gives control over inferred attribute types.
- Open the XLS file in Excel or LibreOffice Calc. Keep one table only; remove title rows, totals, blank separator rows, comments, and repeated headings. Give every column a unique header.
- Recalculate formulas and save the workbook. CSV export writes displayed or cached values, not Excel formula logic.
- Export the relevant worksheet using File → Save As or File → Export and select
CSV UTF-8where available. Excel exports only the active worksheet; repeat the process for each required sheet. - Start Weka, open Explorer → Preprocess, select Open file, and open the CSV file.
- Inspect every attribute. Remove non-feature columns with Filter → Choose → unsupervised → attribute → Remove. Use StringToNominal for finite categories and NumericToNominal for codes or identifiers whose numeric magnitude has no meaning.
- Set the target attribute in Weka's Class selector when preparing supervised data. ARFF does not store a class designation; Weka may need that selection again after reopening the file.
- Select Save, use a filename ending in
.arff, and reopen the result to check the relation name, attribute declarations, and instance count.
Some Weka distributions provide an Excel or Spreadsheet loader that can open XLS directly. Use it only after confirming that the installed loader supports the source format and imports the intended worksheet correctly; direct import can differ by Weka version and optional libraries.
For a non-confidential one-off conversion, Convertio can be used if its current format selector offers XLS to ARFF. Inspect the downloaded file in Weka before using it, and do not upload personal, health, financial, or proprietary workbooks to third-party services.
Schema and compatibility checks
ARFF does not preserve formulas, charts, cell formatting, merged cells, comments, pivot tables, named ranges, macros, or additional worksheets. It stores values and declared attributes only.
Keep each column type consistent. A mostly numeric column containing labels such as N/A may be loaded as text, while a customer number may be treated as a numeric measurement even though it is only an identifier. Remove identifiers when possible; otherwise make them nominal or string attributes.
Use ? for missing ARFF values. Empty spreadsheet cells, N/A, and - need deliberate handling because they may become literal category values or force a text attribute.
Dates require particular care. CSV has no reliable date type, so verify that date columns have the intended ARFF declaration, such as @attribute order_date date "yyyy-MM-dd", rather than an arbitrary string or number. Values containing commas, quotes, spaces, braces, or percent signs may require ARFF quoting and escaping; saving from Weka handles this syntax.
XLS vs ARFF: format comparison
How the XLS and ARFF formats compare on the properties that matter most for this conversion.
| Property | .XLS Microsoft Excel Spreadsheet | .ARFF Attribute-Relation File Format |
|---|---|---|
| Open standard | No | Partly open |
| Compression | Both | Uncompressed |
| Typical file size | Medium | Small |
| Opens in a web browser | Partial | Partial |
| Further editing | Limited | Easy |
| Metadata support | Basic | Basic |
| Plain-text readable | No | Yes |
| Best used for | Data exchange | Data exchange |
| Introduced | 1987 | — |
| Developer | Microsoft | University of Waikato / WEKA project |
| MIME type | application/vnd.ms-excel | text/arff |
Suggested software and links: xls to arff converters
Additional formats for
xls file conversion
- xls to sav
- xls to xlsmhtml
- xls to exp
- xls to wq1
- xls to wb1
- xls to ris
- xls to xlmx
- xls to prn
- xls to xlr
- xls to des
- xls to 123
- xls to _xls
- xls to asc
- xls to ast
- xls to atomsvc
- xls to aws
- xls to bna
- xls to ded
- xls to dif
- xls to dqy
- xls to ecsv
- xls to fmp
- xls to fods
- xls to fp4
- xls to gif
- xls to ics
- xls to json
- xls to mso
- xls to odc
- xls to odf
- xls to ots
- xls to pmdx
- xls to pxl
- xls to pxt
- xls to qpw
- xls to rtm
- xls to sdc
- xls to sdd
- xls to smf
- xls to sta
- xls to stm
- xls to sxc
- xls to text
- xls to uos
- xls to vcs
- xls to wb0
- xls to wb2
- xls to wb3
- xls to wbd
- xls to wk!
- xls to wk3
- xls to wke
- xls to wkq
- xls to wks
- xls to wmf
- xls to wq2
- xls to xl
- xls to xlc
- xls to xlk
- xls to xlshtml
- xls to xltm
- xls to xltx
- xls to xlw
- xls to xss