-
Notifications
You must be signed in to change notification settings - Fork 195
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
Read blank excel sheets with headers #144
Comments
Semi-duplicate of #222. Only difference: this issue confirms same behaviour happens when column headers are present, but there's no data. I verified that. |
This was referenced Jan 7, 2017
jennybc
added a commit
that referenced
this issue
Jan 31, 2017
#240) * Load cells at xlsx worksheet ingest; handle skipping and/or blank rows; fixes #224 * Actually these *should* be the same * Make skipping tests more challenging (blank row btwn col names and data, plus another embedded blank row) * Simplify return of 0x0 tibble for completely empty worksheet * Mark cells to start reading from at the time of worksheet construction * Remove vestigial, internal cell printing function * Be quiet about empty worksheet * More tests of nothingness * Inform worksheet about its own name * Tighten up the NEWs bullet for this PR * Make some accessor member functions const * Use skip() to issue note-to-future-self Expedient place to park a summary of what this entire PR does. * Improved parsing of sheet geometry for xlsx. (#240, @jennybc). - Better handling of leading and embedded blank rows and explicit row skipping. (#224, #194, #178, #156, #101) - Worksheets that are completely empty or that contain only column names no longer error, but return a tibble with zero rows. (#222, #144, #65) - Location is inferred for cells that do not declare their location (e.g. xlsx written by JMP). (#163, #102)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I need to read the sheet with headers, even if there is no data.
Example: if we have an excel file temp.xlsx with a sheet named Sheet1 with 3 columns as below with no data rows, just a header:
Gives error:
I could set
col_names = FALSE
, then use the 1st row to be a header. As I need to read multiple sheets, some will have data and some will be blank with just a header, this is a bit painful.Any better solution?
The text was updated successfully, but these errors were encountered: