You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, there is some functionality for writing an AbstractVector (see source). By default, a vector is written into a single row.
How about extending the interface to enable the following ? I could make a pull request, but would such an extension be desirable?
enable writing vectors into columns (same interface as writing into rows)
enable writing 2-D arrays, i.e. AbstractMatrix directly to the sheet (similar interface)
This could lead to some design changes:
The functions available for data::AbstractVector where the row is an Integer and the argument for the columns is a UnitRange or a Colon could be duplicated with equivalent functions where instead the column is an Integer and the argument for the rows can be a UnitRange or a Colon
The functions available for data::AbstractVector could be duplicated, but allowing data::AbstractMatrix and corresponding possibilities for the row/column arguments
Base.setindex!(sheet::Worksheet, data::AbstractVector, ref_str::AbstractString) currently converts ref_str to a CellRef. Instead, one could try to convert it to either a CellRef or to a CellRange and then proceed accordingly
The text was updated successfully, but these errors were encountered:
@felixrehren, the basic idea of a spreadsheet is to have a set of labeled columns. But there is also the kind of use case for matrices, like correlation matrices. So your proposal is welcome. Go ahead if you want to make a PR. Just try to make it non-beaking.
felipenoris
changed the title
Proposal: writing matrices to a sheet
Accept matrix as input for writetable!
Feb 16, 2019
Hello,
currently, there is some functionality for writing an
AbstractVector
(see source). By default, a vector is written into a single row.How about extending the interface to enable the following ? I could make a pull request, but would such an extension be desirable?
AbstractMatrix
directly to the sheet (similar interface)This could lead to some design changes:
data::AbstractVector
where the row is anInteger
and the argument for the columns is aUnitRange
or aColon
could be duplicated with equivalent functions where instead the column is anInteger
and the argument for the rows can be aUnitRange
or aColon
data::AbstractVector
could be duplicated, but allowingdata::AbstractMatrix
and corresponding possibilities for the row/column argumentsBase.setindex!(sheet::Worksheet, data::AbstractVector, ref_str::AbstractString)
currently convertsref_str
to aCellRef
. Instead, one could try to convert it to either aCellRef
or to aCellRange
and then proceed accordinglyThe text was updated successfully, but these errors were encountered: