taskLet me illustrate... - Tasks: task #5224, Paste column from ms 'excel'...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #5224: Paste column from ms 'excel' spreadsheet

Submitter:  Greg Chicares <chicares>
Submitted:  Thu 02 Feb 2006 01:11:40 PM UTC
   
 
Should Start On:  Thu 02 Feb 2006 12:00:00 AM UTC Should be Finished on:  Thu 02 Feb 2006 12:00:00 AM UTC
Category:  GUI Priority:  1 - Later
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Wed 27 Feb 2008 12:20:26 PM UTC, comment #1: 

Finished 20080226T0259Z. An earlier implementation had handled
column vectors, but not row vectors.

The revised implementation is simpler and doesn't favor any
platform over another: it merely transforms '\n' and '\t' to
';' while removing '\r'.

A semi-automated unit test has been added. That's particularly
important because this facility was broken in the January lmi
release due to a wx regression error.

Greg Chicares <chicares>
Group administrator
Thu 02 Feb 2006 01:11:40 PM UTC, original submission:  

End users often work with input data from this spreadsheet.
A single spreadsheet cell can be pasted correctly into a
wxTextCtrl (wndclass 'EDIT' in msw terminology). They also
want to paste columns, which might contain numbers or
strings; that might work for multiline text controls, but
lmi tries to use only single-line controls, which doesn't
work. I looked into this years ago and found that data for
cells in a column are separated by carriage returns, and
that pasting for single-line text controls discarded all
data after the first carriage return. (Reference: my email
of 2003-11-17T00:18Z, for those who have it.) IIRC, pasting
a spreadsheet row gives all data--but delimited by tabs,
which isn't what we want. Of course, ms might have changed
their api in the meantime; I'm sure their spreadsheet
originally (at least) used a different clipboard than their
OS or their other applications.

In both cases (row and column), we need the data delimited
by semicolons, in order to follow the grammar of lmi's
'input sequence' parser.

Vadim had written on 2005-08-21T13:20Z "AFAICS this would
require some (being discussed anyway) changes to
wxCustomDataObject in wx itself + support for Excel
clipboard format in LMI".

Let's make sure we can do the same things on GNU/Linux,
with a widely-used free spreadsheet ('gnumeric'?) so
that msw is not favored.

Users do not need to paste ranges any more complicated than
contiguous row-vectors or column-vectors. This is distinct
from function GetClipboardText() in 'lmi/census_view.cpp',
which is based on Vadim's 2005-03-14T13:12:15 +0100 email:
there, a rectangular range was fed to the program directly,
but here, a vector is fed to a text control.

Eventually, we'll want to replace class CensusView's
wxListView with a grid control; pasting into a grid cell
should work there the same as pasting to a wxTextCtrl.

For example:
  in user spreadsheet, copy {1, 2, 3...N}, an N-element
    row-vector or column-vector
  in lmi, paste the string "1;2;3" into a wxTextControl or a
    single wx...Grid cell--*not* into a row or column range
I expect that N would generally be between [2, 100], but
never greater than the number of years a human being can live.
I use this constant
  int methuselah = 969; // Genesis 5:27.
although the secular-minded would be safe with, say, 200, if
it helps to have a limit. For purposes of this specification,
we define a spreadsheet range with N = 1 to be a scalar, and
thus neither a row nor a column vector, so N = 2 is a firm
minimum.

Greg Chicares <chicares>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chicares (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-02-27 chicares StatusNone Done
        Open/ClosedOpen Closed
    2006-04-27 wboutin CategoryNone GUI

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code