Hi all,

I'm the author of the tool on ooomacros (TextToColumns)

Thanks to all who all that forwarded me this thread.
This is no longer needed because now I'm following the list through gmane

For Pere Castañer:
Sorry for not having replied to your previous messages.
Truly I was convinced to have already answered but evidently I haven't
This may happen managing emails from several pc's in different places
(office/home/laptop) ;-(

Regarding the subject, please see my comments inline

Pere Castañer Sarda wrote:

> On Mon, 12 Sep 2005 18:32:08 +0200
> Eike Rathke wrote:
> 
>> Hi Pere,
>> 
>> On Mon, Sep 12, 2005 at 15:44:36 +0200, Pere Castañer Sarda wrote:
>> 
>> > No. I need to convert the exported cells (from a closed source
>> > software) plenty of char text representing numbers with the format
>> > XXXXX.XX to XXXXX,XX
>> 
>> In case you're importing a Text/CSV file, during import in the import
>> dialog you can set a column type to "US English", does that help?
>>
> 
> Yes. In fact it is the method that I'm dealing with the exported data. The
> procedure is like this:
[...
> The procedure is a litle tricky but works. 

Have you thought to automate this procedure by macros?
It's not difficult to import a CSV with a predefined set of options.

this is an example:
------------------------------
REM  *****  BASIC  *****

Sub TestCSVImport

'url of the text table to import
sUrl = "file:///home/paolo/test.txt"    

sFieldSeparator = "32/9" 'charcode for SPACE and TAB
sTextDelimiter = "34" 'charcode for "
sCharSet = "0" 'System charset
sFirstLine = "1" 'start from line 1
sCellFormatCodes = "1/9/2/2/3/1/4/1/5/1"        
        
sOptions = sFieldSeparator & ","
sOptions = sOptions & sTextDelimiter & ","
sOptions = sOptions & sCharSet & ","
sOptions = sOptions & sFirstLine & ","
sOptions = sOptions & sCellFormatCodes

Dim mProps(1) As New com.sun.star.beans.PropertyValue
        
mProps(0).Name = "FilterName"
mProps(0).Value = "Text - txt - csv (StarCalc)"
                
mProps(1).Name = "FilterOptions"
mProps(1).Value = sOptions

oDoc = StarDesktop.LoadComponentFromUrl(sUrl,"_default",0,mProps())
        
End Sub
------------------------------

As you can see the only "difficult" part is to build the string
sCellFormatCodes
For a complete specification see the Dev Guide:
8.2 Handling Spreadsheet Document Files
        Filter Options for the CSV Filter



> The real pity of all of this is 
> about the existence of a tool like text2column macro and the feature of
> choosing the decimal separator char is missing.

At the moment I'm very busy so I can't promise anything but after ooocon2005
I'll have a deeper look and try to solve the problem.

> If this weekend I've a 
> moment I'll check the source code to determine if I'm able to revise the
> code of Paolo Mantovani (But I haven't much hope that I can modify any
> bite...)

As I said I'm very busy but If you need some hints feel free
to contact me.
(this time I'll try to answer in a shorter time :-)

Ciao
Paolo M

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to