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

Table Export as Indents #47

Open
algoldst opened this issue Apr 20, 2024 · 1 comment
Open

Table Export as Indents #47

algoldst opened this issue Apr 20, 2024 · 1 comment

Comments

@algoldst
Copy link

Hi, great extension you've created!
I'm trying to get export to work where it automatically creates additional columns for sub-tasks:

image

Basically, I think that the "part 1" and "part 2", as sub-tasks underneath "thing 4", should have their own empty csv column, and start being listed in the second column. You'd have to have a variable number of columns before the "start" and "end" time columns, in order to represent sub-task levels in this way. But I think it would be better / more intuitive.

Also, I tried coding up a solution that would simply detect the blank spaces in the timestamps, to auto-indent the stuff below. But in fact, it's not possible to do this, because there's no way to recognize when we've hit the last item in a sub-hierarchy! Eg. After Part 1, the task "Thing 5" is not recognizable as its own top-level task. This means no program analyzing it (or really, any person who didn't know about the tasks) would be able to recognize where a sub-task list ends and a new top-level task begins, as far as I can tell.

@Karamellwuerfel
Copy link
Contributor

Hi @algoldst,
in a CSV file, it's not possible to represent indentations by using new cells or to maintain a visual hierarchy like in Excel. CSV is a plain text format that only stores the raw data of each cell without any layout or formatting information (such as merged or indented cells).

Explanation

  • The example provided is created using Excel, where cells are manually indented or visually structured to represent a hierarchy. This is an Excel feature and is not preserved in a CSV file.
  • When exporting the Excel table to CSV format, all formatting, indentations, and merged cells are lost. The CSV file only stores the raw text content of each cell, and the hierarchy information is not retained.

Alternative Representation in CSV

To indicate sub-tasks in CSV, you can use prefixes like "-" to visually represent the hierarchy. This approach provides a textual indication of the hierarchy without relying on cell formatting.

Issue References

This pull request will format the sub-entries as following:
Pasted image 20241117164828

@Ellpeck this issue may be closed due to a duplicate of issue #22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants