diff --git a/agateexcel/table_xls.py b/agateexcel/table_xls.py
index 19612c6..9fb9c4a 100644
--- a/agateexcel/table_xls.py
+++ b/agateexcel/table_xls.py
@@ -83,6 +83,11 @@ def from_xls(cls, path, sheet=None, skip_lines=0, header=True, encoding_override
             for i in range(len(columns[0])):
                 rows.append([c[i] for c in columns])
 
+        if 'column_names' in kwargs:
+            if not header:
+                column_names = kwargs.get('column_names', None)
+            del kwargs['column_names']
+
         tables[sheet.name] = agate.Table(rows, column_names, **kwargs)
 
     if multiple:
diff --git a/agateexcel/table_xlsx.py b/agateexcel/table_xlsx.py
index 87619e9..37afd71 100644
--- a/agateexcel/table_xlsx.py
+++ b/agateexcel/table_xlsx.py
@@ -82,6 +82,11 @@ def from_xlsx(cls, path, sheet=None, skip_lines=0, header=True, read_only=True,
 
             rows.append(values)
 
+        if 'column_names' in kwargs:
+            if not header:
+                column_names = kwargs.get('column_names', None)
+            del kwargs['column_names']
+
         tables[sheet.title] = agate.Table(rows, column_names, **kwargs)
 
     f.close()

Passing column_names to from_xls fails with TypeError
```
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/Users/jani.mikkonen/src/customers/vr/vr/venv/lib/python3.7/site-packages/agateexcel/table_xls.py", line 86, in from_xls
    tables[sheet.name] = agate.Table(rows, column_names, **kwargs)
TypeError: __init__() got multiple values for argument 'column_names'
```

if column_names is present in kwargs, maybe remove column_names  from  there and copy it to the positional parameter passed to agate.Table() in https://github.com/wireservice/agate-excel/blob/master/agateexcel/table_xlsx.py#L85 & https://github.com/wireservice/agate-excel/blob/master/agateexcel/table_xls.py#L86  ? 




diff --git a/tests/test_table_xls.py b/tests/test_table_xls.py
index cc7b3e8..6d02d74 100644
--- a/tests/test_table_xls.py
+++ b/tests/test_table_xls.py
@@ -19,6 +19,10 @@ class TestXLS(agate.AgateTestCase):
             'number', 'text', 'boolean', 'date', 'datetime',
         ]
 
+        self.user_provided_column_names = [
+            'alt number', 'alt text', 'alt boolean', 'alt date', 'alt datetime',
+        ]
+
         self.column_types = [
             agate.Number(), agate.Text(), agate.Boolean(),
             agate.Date(), agate.DateTime(),
@@ -26,6 +30,13 @@ class TestXLS(agate.AgateTestCase):
 
         self.table = agate.Table(self.rows, self.column_names, self.column_types)
 
+    def test_from_xls_with_column_names(self):
+        table = agate.Table.from_xls('examples/test.xls', header=False, skip_lines=1, column_names=self.user_provided_column_names )
+
+        self.assertColumnNames(table, self.user_provided_column_names)
+        self.assertColumnTypes(table, [agate.Number, agate.Text, agate.Boolean, agate.Date, agate.DateTime])
+        self.assertRows(table, [r.values() for r in self.table.rows])
+
     def test_from_xls(self):
         table = agate.Table.from_xls('examples/test.xls')
 
diff --git a/tests/test_table_xlsx.py b/tests/test_table_xlsx.py
index 6dd4434..9b56b9b 100644
--- a/tests/test_table_xlsx.py
+++ b/tests/test_table_xlsx.py
@@ -19,6 +19,10 @@ class TestXLSX(agate.AgateTestCase):
             'number', 'text', 'boolean', 'date', 'datetime',
         ]
 
+        self.user_provided_column_names = [
+            'number', 'text', 'boolean', 'date', 'datetime',
+        ]
+
         self.column_types = [
             agate.Number(), agate.Text(), agate.Boolean(),
             agate.Date(), agate.DateTime(),
@@ -26,6 +30,13 @@ class TestXLSX(agate.AgateTestCase):
 
         self.table = agate.Table(self.rows, self.column_names, self.column_types)
 
+    def test_from_xlsx_with_column_names(self):
+        table = agate.Table.from_xlsx('examples/test.xlsx', header=False, skip_lines=1, column_names=self.user_provided_column_names)
+
+        self.assertColumnNames(table, self.user_provided_column_names)
+        self.assertColumnTypes(table, [agate.Number, agate.Text, agate.Boolean, agate.Date, agate.DateTime])
+        self.assertRows(table, [r.values() for r in self.table.rows])
+
     def test_from_xlsx(self):
         table = agate.Table.from_xlsx('examples/test.xlsx')
 

pip install -e .[dev]
parse_log_pytest
requirements.txt
six pytest
apt-get update apt-get install -y gcc
3.9
requirements-py3.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
agate==1.13.0
-e git+https://github.com/wireservice/agate-excel.git@bb7474e2762099af5d6053e548341c460a47a758#egg=agate_excel
alabaster==0.7.16
babel==2.17.0
cachetools==5.5.2
certifi==2025.1.31
chardet==5.2.0
charset-normalizer==3.4.1
colorama==0.4.6
distlib==0.3.9
docutils==0.21.2
et_xmlfile==2.0.0
exceptiongroup==1.2.2
filelock==3.18.0
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
isodate==0.7.2
Jinja2==3.1.6
leather==0.4.0
MarkupSafe==3.0.2
nose==1.3.7
openpyxl==3.1.5
packaging==24.2
parsedatetime==2.6
platformdirs==4.3.7
pluggy==1.5.0
Pygments==2.19.1
pyproject-api==1.9.0
pytest==8.3.5
python-slugify==8.0.4
pytimeparse==1.1.8
requests==2.32.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
text-unidecode==1.3
tomli==2.2.1
tox==4.25.0
typing_extensions==4.13.0
urllib3==2.3.0
virtualenv==20.29.3
xlrd==2.0.1
zipp==3.21.0

name: agate-excel
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - agate==1.13.0
      - alabaster==0.7.16
      - babel==2.17.0
      - cachetools==5.5.2
      - certifi==2025.1.31
      - chardet==5.2.0
      - charset-normalizer==3.4.1
      - colorama==0.4.6
      - distlib==0.3.9
      - docutils==0.21.2
      - et-xmlfile==2.0.0
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - isodate==0.7.2
      - jinja2==3.1.6
      - leather==0.4.0
      - markupsafe==3.0.2
      - nose==1.3.7
      - openpyxl==3.1.5
      - packaging==24.2
      - parsedatetime==2.6
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pygments==2.19.1
      - pyproject-api==1.9.0
      - pytest==8.3.5
      - python-slugify==8.0.4
      - pytimeparse==1.1.8
      - requests==2.32.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - text-unidecode==1.3
      - tomli==2.2.1
      - tox==4.25.0
      - typing-extensions==4.13.0
      - urllib3==2.3.0
      - virtualenv==20.29.3
      - xlrd==2.0.1
      - zipp==3.21.0
prefix: /opt/conda/envs/agate-excel

tests/test_table_xls.py::TestXLS::test_from_xls_with_column_names
tests/test_table_xlsx.py::TestXLSX::test_ambiguous_date tests/test_table_xlsx.py::TestXLSX::test_empty tests/test_table_xlsx.py::TestXLSX::test_file_like tests/test_table_xlsx.py::TestXLSX::test_from_xlsx tests/test_table_xlsx.py::TestXLSX::test_from_xlsx_with_column_names tests/test_table_xlsx.py::TestXLSX::test_numeric_column_name tests/test_table_xlsx.py::TestXLSX::test_sheet_index tests/test_table_xlsx.py::TestXLSX::test_sheet_multiple tests/test_table_xlsx.py::TestXLSX::test_sheet_name tests/test_table_xlsx.py::TestXLSX::test_skip_lines
tests/test_table_xls.py::TestXLS::test_ambiguous_date tests/test_table_xls.py::TestXLS::test_empty tests/test_table_xls.py::TestXLS::test_file_like tests/test_table_xls.py::TestXLS::test_from_xls tests/test_table_xls.py::TestXLS::test_header tests/test_table_xls.py::TestXLS::test_numeric_column_name tests/test_table_xls.py::TestXLS::test_sheet_index tests/test_table_xls.py::TestXLS::test_sheet_multiple tests/test_table_xls.py::TestXLS::test_sheet_name tests/test_table_xls.py::TestXLS::test_skip_lines tests/test_table_xls.py::TestXLS::test_zeros tests/test_table_xlsx.py::TestXLSX::test_header
agateexcel/table_xls.py agateexcel/table_xlsx.py
agateexcel/table_xls.py agateexcel/table_xlsx.py