New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Equality of autogenerated colnames (xls vs. xlsx) #98

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@krlmlr
Member

krlmlr commented May 8, 2015

With col_names = FALSE, .xls colnames start with X0 and .xlsx colnames start with X1. Shall column names always begin with X1?

So far, this pull request only contains a failing test.

Test output:

1. Failure (at test-colnames.R#7): auto-generated column names are the same for xls and xlsx files 
colnames(xls) not equal to colnames(xlsx)
2 string mismatches:
x[1]: "X0"
y[1]: "X1"

x[2]: "X1"
y[2]: "X2"

(Funny: Another real-life Excel file shows the same behavior the other way round: xls xlsx)

Kirill Müller added some commits May 8, 2015

@hadley

This comment has been minimized.

Member

hadley commented May 8, 2015

Oooh yes, that's probably an off-by-one error in my C++ code

zeehio added a commit to zeehio/readxl that referenced this pull request Apr 11, 2016

@zeehio

This comment has been minimized.

Contributor

zeehio commented Apr 11, 2016

(Just in case you are interested) I fixed this issue in #165, because my test was failing due to this bug.

zeehio added a commit to zeehio/readxl that referenced this pull request Dec 7, 2016

@hadley hadley closed this Jan 18, 2017

zeehio added a commit to zeehio/readxl that referenced this pull request Jan 18, 2017

@Courvoisier13

This comment has been minimized.

Courvoisier13 commented May 3, 2017

Hi,
is there a reason why you guys added a double underscore "__" for the column names? X__1 instead of X1?
thanks

@krlmlr

This comment has been minimized.

Member

krlmlr commented May 3, 2017

I don't know, could you please start a new issue with a reproducible example?

@Courvoisier13

This comment has been minimized.

Courvoisier13 commented May 3, 2017

I am not sure it's an issue. see https://github.com/tidyverse/readxl/releases it says:
"Default column names for xlsx now start with X__1 instead of X__0. (#98, @zeehio, @krlmlr)"
But before the default column names was X0, X1, X2 ... not X__0, X__1, X__2....
Now, the default column names are X__1, X__2, X__3. I don't understand why there is a double underscore.

@krlmlr

This comment has been minimized.

Member

krlmlr commented May 3, 2017

Neither do I, but discussions in closed issues rarely seem to be helpful. That's why I suggested to open a new issue or perhaps ask elsewhere. (Maybe there's a relevant item in the NEWS?)

@zeehio

This comment has been minimized.

Contributor

zeehio commented May 3, 2017

The column names now are X1, X2... as expected. This looks like an error in the NEWS file introduced at a41f61b , so don't worry about it (or submit a pull request fixing it if it bothers you a lot).

@Courvoisier13

This comment has been minimized.

Courvoisier13 commented May 3, 2017

No, I am getting X__1, X__2..... huh, looks like we get different results. will open an issue and post examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment