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

Copy & Paste as HTML (for Excel) #338

Closed
berndmoos opened this issue Oct 26, 2022 · 6 comments
Closed

Copy & Paste as HTML (for Excel) #338

berndmoos opened this issue Oct 26, 2022 · 6 comments

Comments

@berndmoos
Copy link
Collaborator

A feature request from the survey:

To clarify the feature request on copying interlinear to Word/Excel: this is maybe specific to the particular layout used in INEL, but what we need does not work so much with Ctrl-C. Suppose I'm trying to copy this sentence:

image

As you can see in the screenshot, I've got here one long annotation for the sentence (e.g. full text, translation and reference) spanning three individual events for each word.
When I try to copy and paste it into Excel, I get this:

image

with everything in one column, instead of three columns (one per word). And since there are no leading or trailing spaces except in transcription tier, there are no delimiters whatsoever in the result, so I must recover word boundaries manually...

May be possible to transfer sumpin from EXACT's copy & paste.

@berndmoos
Copy link
Collaborator Author

And for Copy&Paste via RTF: this should also be possible for a selection of tiers (i.e. not all tiers)

berndmoos added a commit that referenced this issue Nov 18, 2022
berndmoos added a commit that referenced this issue Nov 18, 2022
@berndmoos
Copy link
Collaborator Author

This will become Copy HTML

@sarkipo
Copy link

sarkipo commented Nov 25, 2022

  1. Generally, „Partitur“ fragments are copied fine as a table, both into Word and into Excel. Fonts and font attributes are preserved.
  2. In Excel, the column width is not preserved at first, but can be set using AutoFit Column Width command.

Some remaining issues are illustrated below for MS Word.

  1. Hidden tiers are also copied (I would expect it is not the desired behaviour). See in ex. (1) and elsewhere the hidden tiers copied between gg-KuNS and BOR-KuNS.

  2. It is important how multiple annotation selection works across tiers. It turns out that in some cases:

(i) Some highlighted annotations are actually not selected (see ex. (2) and (4)), and as a result not copied.
(ii) A rectangular selection with the mouse cannot select all the annotations in the rectangle (see ex. (2)).
A workaround in those cases is to select more annotations than actually needed in order to copy what is needed; see ex. (3) (extending selection to the right) and (5) (extending selection downwards).
In all these examples, the “Transcription” (type “t”) tier is tx-KuNS, which has word-size events. Sentence-size events in “Annotation” (type “a”) tiers ts-KuNS, fe-KuNS etc. span multiple words. Problems with selection seem to arise when the last tier selected with the mouse spans multiple events. Cf. the timeline in ex. (4) and (5).

exmaralda-copyHTML.pdf

@berndmoos berndmoos changed the title Copy & Paste as CSV/TSV for Excel Copy & Paste as HMTL (for Excel) Nov 25, 2022
berndmoos added a commit that referenced this issue Dec 1, 2022
@berndmoos
Copy link
Collaborator Author

Hidden tiers are also copied (I would expect it is not the desired behaviour)

No, it is not desired behaviour. I (think I) fixed that.

It is important how multiple annotation selection works across tiers.

Non-rectangular selection including spanned events is not well-defined. I'm afraid we will have to live with the workaround.

@sarkipo : can you test the new preview at https://exmaralda.org/files/prevDL/experimental.html ?

@sarkipo
Copy link

sarkipo commented Dec 1, 2022

Non-rectangular selection including spanned events is not well-defined. I'm afraid we will have to live with the workaround.

Ok, happily it is not too difficult.

Yes, hidden tiers are not copied any more!

@berndmoos berndmoos changed the title Copy & Paste as HMTL (for Excel) Copy & Paste as HTML (for Excel) Feb 14, 2023
@berndmoos
Copy link
Collaborator Author

Done, methinks

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

No branches or pull requests

2 participants