Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "julia"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
20 changes: 0 additions & 20 deletions .github/workflows/jlpkgbutler-butler-workflow.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/jlpkgbutler-ci-master-workflow.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/jlpkgbutler-ci-pr-workflow.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/jlpkgbutler-codeformat-pr-workflow.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/jlpkgbutler-compathelper-workflow.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/jlpkgbutler-tagbot-workflow.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/juliaci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Julia CI

on:
push: {branches: [main,master]}
pull_request: {types: [opened,synchronize,reopened,ready_for_review,converted_to_draft]}
issue_comment: {types: [created]}
workflow_dispatch: {inputs: {feature: {type: choice, description: What to run, options: [DocDeploy,LintAndTest,TagBot]}}}

jobs:
julia-ci:
uses: julia-testitems/testitem-workflow/.github/workflows/juliaci.yml@v2
with:
include-all-compatible-minor-versions: true
include-rc-versions: true
permissions: write-all
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ deps/deps.jl
**/.~*
Manifest.toml
.vscode
docs/build/
docs/Manifest.toml
test-output*.*
1 change: 0 additions & 1 deletion .jlpkgbutler.toml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 David Anthoff and Felipe Noronha
Copyright (c) 2019-2026 David Anthoff and Felipe Noronha

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
19 changes: 11 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name = "LibXLS"
uuid = "221edcab-ec84-5148-84a2-7385855c517f"
version = "0.1.0-DEV"
version = "1.0.0-DEV"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
libxls_jll = "86717fa1-76ed-5f2d-aba0-009d7207923f"

[compat]
Dates = "1"
julia = "1.12"
libxls_jll = "1.6.2"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe"

[targets]
test = ["Test"]

[compat]
BinaryProvider = "≥ 0.5.3"
julia = "1"
test = ["Test", "TestItemRunner", "TestItems"]
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
# LibXLS

[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
[![Build Status](https://travis-ci.org/queryverse/LibXLS.jl.svg?branch=master)](https://travis-ci.org/queryverse/LibXLS.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/bi520tv2k5q8ta49/branch/master?svg=true)](https://ci.appveyor.com/project/queryverse/libxls-jl/branch/master)
[![codecov](https://codecov.io/gh/queryverse/LibXLS.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/queryverse/LibXLS.jl)
[![Build Status](https://github.com/queryverse/LibXLS.jl/actions/workflows/juliaci.yml/badge.svg?branch=main)](https://github.com/queryverse/LibXLS.jl/actions/workflows/juliaci.yml)

## Overview

Read Excel xls files.
LibXLS reads legacy Excel xls files (the BIFF format used by Excel 97-2003).
It wraps the [libxls](https://github.com/libxls/libxls) C library, with
binaries provided by `libxls_jll`, so it works without any Python or Java
dependency.

For modern xlsx files use [XLSX.jl](https://github.com/JuliaData/XLSX.jl)
instead; LibXLS deliberately only handles the legacy format.

## Usage

```julia
using LibXLS

wb = openxls("data.xls")

sheetnames(wb) # names of all sheets
ws = getworksheet(wb, "Sheet1") # or by index: getworksheet(wb, 1)

nrows, ncols = size(ws)
ws[1, 1] # value of the cell in the first row and column

close(wb)
```

The do-block form closes the workbook automatically:

```julia
openxls("data.xls") do wb
getworksheet(wb, 1)[2, 3]
end
```

Cell values are returned as `Float64`, `String`, `Bool`, `DateTime`, `Time`,
`CellError` (for cells holding an Excel error such as `#DIV/0!`) or `missing`
(for blank cells). Whether a numeric cell holds a date is determined from the
cell's number format, honoring both the 1900 and the 1904 date system.
1 change: 0 additions & 1 deletion deps/build.jl

This file was deleted.

48 changes: 0 additions & 48 deletions deps/build_libxls.v1.5.0.jl

This file was deleted.

12 changes: 5 additions & 7 deletions src/LibXLS.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@

module LibXLS

# Load libreadstat from our deps.jl
const depsjl_path = joinpath(@__DIR__, "..", "deps", "deps.jl")
if !isfile(depsjl_path)
error("LibXLS not installed properly, run Pkg.build(\"LibXLS\"), restart Julia and try again")
end
include(depsjl_path)
using Dates
using libxls_jll: libxlsreader

export openxls, sheetcount, sheetnames, getworksheet, CellError

include("c.jl")
include("types.jl")
include("formats.jl")
include("workbook.jl")
include("worksheet.jl")

Expand Down
Loading
Loading