<div dir="ltr">Hi Lionel,<div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Whether the access the source is read-only or read-write depends on<br>
the underlying driver; for CSV it is probably read-only, be it only<br>
for lack of a primary key. For DBaseIII, for example, I think it is<br>
read/write.<br>
<br>
But Read-only access to the source is all you need for import, so I<br>
don't quite get the point in the current discussion.</blockquote><div><br></div><div>You misunderstood me. I just speak about what the connection feature offer directly. It offers read-only access to calc comaptible files (including text files). It is other question that these read-only tables can be copied. </div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
> The feature which I intend to implement is making a new table and<br>
> insert into the already opened database.<br>
<br>
</div>Yes, which is exactly what the procedure described in my previous mail<br>
also does. Except it is not limited to CSV and other calc-supported<br>
formats (but any supported database), and already gives you access to<br>
each sheet of a calc file instead of the first.<br>
<br>
Which was my main motivation for slapping a better UI on *this*<br>
procedure rather than on the more limited "go through Calc" route.<br></blockquote><div><br></div><div>Well, misunderstandness around. I means making a new table and insert it into the already opened database *in one step*, or more steps but in an automated serial and without opening other window and without copy&paste. I see that the procedure that you described is working and results the same.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
> With this I just say that for the user it can be looked as a<br>
> different thing and so not make confusion.<br>
<br>
</div>Well, if "drag'n drop" and "import" of the *same* data behave<br>
differently in the *same* application (that is, Base), I think this is<br>
confusing and unpredictable: even if the user knows of these two ways,<br>
why would he expect one to work "better" or "different" than the<br>
other?</blockquote><div><br></div><div>I don't know what difference we actually speak about. In my first plan I intended to use the same paste method and the same "Copy Table" dialog which is used for "drag'n drop". The difference is in loading of the source file and so the used csv import UI. But it can confusing too, so it might be clearer to use the same as in "Connect to an existing database" option.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>
> Implementation is an other part. Of course I will look up the code<br>
> of this connection thing and reuse all the usefull code. But the<br>
> implementation which I planed is not means real new code, but<br>
> intentse use of UNO API.<br>
<br>
</div>Once you have a SDBC URL, the rest of the work is also completely<br>
through the UNO API: I expect in<br>
 com.sun.star.sdb<br>
 com.sun.star.sdbc<br>
 com.sun.star.sdbcx<br>
<br>
I expect that the existing code path used when copy/pasting from one<br>
Base file to the other uses pretty much these APIs.</blockquote><div><br></div><div style>I will look up these things.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
> The Writer OLE-object feature (...) the same file import as Calc do<br>
> (...) which more usefull than the page with the same aim in<br>
<div>> Base. More usefull means more options and a table showing the<br>
> expected result.<br>
<br>
</div>Well, if the CSV setup screen in Base sucks, we can fix<br>
*that*. Possibly even use the same setup screen than in Calc? As in:<br>
merge the two.</blockquote><div><br></div><div style>As I see its not an easy hack. In Clalc the import UI is a ModalDialog, while in Base it is a TabPage which are not a 'mergeable' pair, at least I don't see the way. Additionally in Base wizard there is no enough space for all options and for the table which are in the Calc csv import dialog. Plus the content of the mentioned table (containing expected result) is already loaded in case of Calc, but in Base file-loading is happen after setting the csv import options. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> If you do that (additionally to the easier Base import UI), you'll</blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
have enhanced not only "import into new base file" but also "connect<br>
to CSV directly", which is used e.g. by Writer's mail merge, as well<br>
as by Base. I.e. it has broader appeal / applicability for our users.<br>
<br>
<br>
IMO, having a "import into any database from any database" feature is<br>
also more broadly useful than only "import into any database from a<br>
Calc-supported file". So I'd prefer we had the former; I don't think<br>
it is essentially more difficult, but I agree that for the specific<br>
case of CSV, enhancing Base's connect UI to match Calc's open UI *is*<br>
definitely an additional work.<br></blockquote><div><br></div><div style>I just imagine a 4th option to the start page of Base wizard, with label "Import table(s) from existing database". For a simple user I think it is not so obvious that this option can be used to import a table from a spreadsheet (for example), because by default a spreadsheet not a database (the same problem i have with "Connect to an existing database" option). Of course it is good that this option can be used in general, for all databases but if the user can't see for the first sight that which option can be used to solve his\her problem than this option not works. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
CSV seems to be more important for you than "all other database<br>
formats", I don't know why <shrug>. From a broader perspective, I<br>
would regret that Base has a more restricted-to-CSV "import"<br>
functionality (rather than "import from any database, including CSV")<br>
only to marginally better serve the CSV case in the short term.</blockquote><div><br></div><div>The reason is that I have this task: to add a simple way to import tables from calc compatible files. :D<br></div><div style>
But let see how can I use the existent Base wizard and "Connect to an existing database" option, maybe it can be extended easily.</div><div style><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>
>>>    The only question is where this feature would be reachable. I have two<br>
>>> ideas and I think all of these two places should be used:<br>
>>>    1. Table view -> "Tasks". Add a 4th option like "Import Table From<br>
>>> File...". This point contains all other places which are almost the<br>
>>> duplicates of this "Tables" list (e.g. Insert menu with label "Table<br>
>>> (Import)..." ).<br>
>>>    2. Table view -> "Tables" -> context menu. The label can be "Import<br>
>>> Table...".<br>
<br>
>> The context menu does not make that much sense to me, unless we *also*<br>
>> add the other tasks to it (and then also in Queries, Forms and Reports).<br>
<br>
> It comes in my mind just because the commonly used method is the<br>
> copy&paste<br>
<br>
</div>You mean "copy&paste from Calc". Is it? It would not have occurred to<br>
me to do a Calc-to-Base copy&paste rather than a Base-to-Base<br>
copy&paste.<br>
<br>
<br>
Anyway, there is another idea for "how to make this feature<br>
reachable":<br>
<br>
1) Open a file manager<br>
<br>
2) Open the LibreOffice window where you want to import the data.<br>
<br>
2) Drag-n-drop the file into the LibreOffice window.<br>
<br>
This currently works for a Calc window, but not for a Base window. I<br>
think it would be amazing if additionally to the tasks pane, drag'n<br>
drop worked.</blockquote><div><br></div><div style>You have amazing ideas :) But not enough time to implement all of them.</div><div style><br></div><div style>Best Regards,</div><div style>Tamás</div></div></div></div></div>