Skip to content
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

ReadExcel data with headers not on row 1 #132

Closed
Burtan opened this issue Aug 1, 2022 · 12 comments
Closed

ReadExcel data with headers not on row 1 #132

Burtan opened this issue Aug 1, 2022 · 12 comments
Labels
good first issue Good issues to pick-up for newcomers

Comments

@Burtan
Copy link

Burtan commented Aug 1, 2022

Hey,
how to read excel tables that don't have their headers on the first row? Many scientific applications export their data with printing device information into the first rows and then following with the actual data.

@Burtan Burtan changed the title ReadExcel, omit rows ReadExcel data with headers not on row 1 Aug 1, 2022
@koperagen
Copy link
Collaborator

Hi! readExcel API doesn't support this right now. Would skipRows: Int = 0 parameter work for you? For skipRows = 1 it'll read headers from the second row.

@koperagen
Copy link
Collaborator

Btw, what application do you use? Would be interesting to better understand the use cases :)

@Burtan
Copy link
Author

Burtan commented Aug 1, 2022

A skipRows function would help. It's qPCR data from a thermo scientific machine. I'm testing some code to automate data evaluation in a pathology context.

koperagen added a commit that referenced this issue Aug 1, 2022
koperagen added a commit that referenced this issue Aug 2, 2022
#132 Add `skipRows` parameter to enable reading data with header from…
@koperagen
Copy link
Collaborator

Hi! Try 0.9.0-dev-1079 with the fix

@Burtan
Copy link
Author

Burtan commented Aug 3, 2022

Hey,
it now correctly skips the given rows, but only takes the columns which are also present in the first row. Here is an example of my sheet. It now only reads Well and Well Position as headers.

<style> </style>
Block Type 96-Well 0.2-mL Block            
Calibration Background is expired No            
...
Stage/ Cycle where Ct Analysis is performed Stage1, Step1            
User Name              
               
Well Well Position Omit Sample Name Target Name Task Reporter Quencher

@koperagen
Copy link
Collaborator

Oh, i see. You can specify column range as a workaround for now. readExcel(columns = "A:H") Meanwhile, ill commit the fix and hopefully it'll be published soon :)

koperagen added a commit that referenced this issue Aug 3, 2022
Consider skipRows when obtaining column indexes #132
@Burtan
Copy link
Author

Burtan commented Aug 3, 2022

Thanks, this works!

@Burtan Burtan closed this as completed Aug 3, 2022
@Burtan
Copy link
Author

Burtan commented Aug 5, 2022

I think the first row after the header is skipped?

@Burtan Burtan reopened this Aug 5, 2022
@koperagen
Copy link
Collaborator

I think the first row after the header is skipped?

Can't reproduce in a test. Can you send a minified example + code that reads it?

@Burtan
Copy link
Author

Burtan commented Aug 5, 2022

Please try this project. The link expires after 7 days. Thanks!
https://cloud.frederik-bertling.de/f/6ebb5bb52031407f9809/

@koperagen
Copy link
Collaborator

koperagen commented Aug 10, 2022

Hi!I'm not sure what's going on, but i can't even read this file. Also, when i open it in google sheets / libreoffice calc, i see this:

edit.
Nevermind, file manager messed up files while unarchiving this rar

koperagen added a commit that referenced this issue Aug 18, 2022
also add some validation of user input.
treat undefined rows in value rows range as nulls
koperagen added a commit that referenced this issue Aug 18, 2022
@Burtan
Copy link
Author

Burtan commented Sep 14, 2022

I can confirm, it works now. Thanks!

@Burtan Burtan closed this as completed Sep 14, 2022
@Jolanrensen Jolanrensen added the good first issue Good issues to pick-up for newcomers label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issues to pick-up for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants