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

File widget: read file without header #6788

Open
alaindebecker opened this issue Apr 23, 2024 · 3 comments
Open

File widget: read file without header #6788

alaindebecker opened this issue Apr 23, 2024 · 3 comments
Assignees
Labels
snack This will take an hour or two

Comments

@alaindebecker
Copy link

What's your use case?

I have files with no header: the first row of my files are data, so the workaround suggested in #6675 (right click on the row index to skip it) does not work: the first row is lost forever.

What's your proposed solution?
Add a number field Number of row for Header.

  • If it is 0, take arbirary names for columns (1,2,3,...), and rename them later.
  • If it greater than 1, it will solve issue-6675, comment-1854075827.
  • Compatibility with previous uses is ensured if the default value is 1.

Are there any alternative solutions?
Do it manually with an editor.

@simonaubertbd
Copy link

+1 very common use case and the proposed solution is the simplest one.

@janezd janezd self-assigned this May 10, 2024
@janezd janezd added the snack This will take an hour or two label May 10, 2024
@markotoplak
Copy link
Member

@alaindebecker, a related trick to #6675 should already work. In CSV File Import, right-click the row number and deselect header (instead of choosing to skip). Then, columns are just indexed.

@janezd
Copy link
Contributor

janezd commented May 13, 2024

Note to self: I was assigned to this to add a hint above the box, telling the user that headers are right-clickable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
snack This will take an hour or two
Projects
None yet
Development

No branches or pull requests

4 participants