data streams in 4.2

Kohei Yoshida kohei.yoshida at collabora.com
Wed Jan 15 06:12:43 PST 2014


On Mon, 2014-01-13 at 22:08 -0500, Neeraj Rai wrote:
> Hi Kohei,
> 
> 
> Is it possible to provide a sample usage for that screen ? Or is it
> too early to ask.

It's a bit too early, but I can provide a rough use of that feature.

in the URL, you point to a file that contains data you want to stream.
Currently we only support CSV file format, and the data needs to be
static (unlike what you might be led to believe given the name of the
feature).

In the "... fill into the range" box, you need to manually type the
range of the first row where you want the data to go.  For instance, if
your source data consists of 4 columns, you could type A1:D1, or B2:E2
etc.  As with any other dialogs that take a cell or cell range address,
the address syntax depends on the currently specitifed syntax.

Then you specify how tall you want the range to be.  Calc will not use
range taller than the specified height in the "Limit to" box, or
Unlimited if you want that data to go all the way down to the last row.

The "When the data arrives" option specifies whether the new record
should go to the bottom or the top of the stack.

Now, this UI will undergo a major change, so expect this to change a lot
in the future versions.  The current UI has a lot of flaws & things I
want to fix, so I don't want to advertise how to use this widely just
yet.

Also, Calc may become very unstable while running data stream.  So, it's
best to do this using a separate, dedicated document.

> Also, can you please point me to portion of code that takes the data
> and puts it into spreadsheet? I am aware that it could look very
> different in final release.

Sure.  Just run

$ find sc -name 'datastream*'

sc/source/ui/inc/datastream.hxx
sc/source/ui/inc/datastreamdlg.hxx
sc/source/ui/docshell/datastream.cxx
sc/source/ui/miscdlgs/datastreamdlg.cxx
sc/source/filter/xml/datastreamimport.cxx
sc/source/filter/xml/datastreamimport.hxx
sc/uiconfig/scalc/ui/datastreams.ui
sc/uiconfig/scalc/toolbar/datastreams.xml

At the topmost directory and you'll get a list of all source files
related to this feature.  The datastreamimport.* files are for ODS
import.  The export code is also somewhere, but not in any of these
files listed here.

Feel free to play around and see what you think.

Kohei




More information about the LibreOffice mailing list