CLN: Remove ExcelWriter.sheetname
State: closed

- [x] xref https://github.com/pandas-dev/pandas/issues/6581
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

cc @WillAyd 

Labels:
name: IO Excel
description: read_excel, to_excel
name: Clean

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=h1) Report
> Merging [#26464](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/374478cb149f5ebc2dd2efd2145443670bf9733e?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26464/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26464      +/-   ##
==========================================
- Coverage   91.76%   91.74%   -0.02%     
==========================================
  Files         174      174              
  Lines       50673    50665       -8     
==========================================
- Hits        46498    46485      -13     
- Misses       4175     4180       +5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.26% <100%> (-0.01%)` | :arrow_down: |
| #single | `41.71% <0%> (-0.08%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/excel/\_base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsL19iYXNlLnB5) | `91.85% <100%> (-0.29%)` | :arrow_down: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.6% <0%> (-0.11%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=footer). Last update [374478c...1b1c7a3](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=h1) Report
> Merging [#26464](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/44d5498d8697513b7a4638c62dd711b1539d2335?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/26464/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26464      +/-   ##
==========================================
- Coverage   91.74%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50763    50755       -8     
==========================================
- Hits        46575    46563      -12     
- Misses       4188     4192       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.25% <ø> (-0.01%)` | :arrow_down: |
| #single | `41.71% <ø> (-0.08%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/excel/\_base.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2V4Y2VsL19iYXNlLnB5) | `91.85% <ø> (-0.29%)` | :arrow_down: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26464/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.02% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=footer). Last update [44d5498...569a649](https://codecov.io/gh/pandas-dev/pandas/pull/26464?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

You were right, @WillAyd. `sheetname` would just get swallowed by **kwargs and not raise. I added additional code & test for the correct raising behavior. 
lgtm. can you merge master (as @WillAyd test refactor was merged); merge on green.
tick the box in #13777 when merged.
Thanks @mroeschke !