pdeffebach / ClipData.jl

Move data to and from the clipboard in Julia
https://pdeffebach.github.io/ClipData.jl/stable/
MIT License
82 stars 6 forks source link

Row vector to `Vector`? #7

Closed alecloudenback closed 3 years ago

alecloudenback commented 3 years ago

Currently, a row of data gets treated inconsistently with column of data:

image

I would propose that a single row get parsed into a Vector. A single row of data in a source like Excel is almost always going to conceptually map to a Vector in Julia and it's an artifact of the two-dimensional nature of spreadsheets that sometimes vector data is stored horizontally and sometimes vertically.

I also think that users would want to egress as a row at times. Fortuneately, there's a simple way to allow this: With ExcelUtilities, a matrix would be translated into a row-output via the transpose of the vector - see this docstring.

To accomplish the proposed behavior, I think all that is needed is that cliparray check the dimensions, and if it's one in either dimension then return it as a vector (e.g. this xlclip code)

pdeffebach commented 3 years ago

Yeah this seems good.

pdeffebach commented 3 years ago

Closed via #8