Hello wise ones!

I have a question regarding *.csv files. As you are all aware, the European *.csv files use the 'semicolon' and the US or India uses 'comma' delimited file. So basically, i have a Perl script with my own set of modules to run it. I use the European format but it has to be compatible for my end users in India as well. In VBA, i could add for example a macro like this to change the format:

Private Sub loadFile(measurementFile As String) Dim query As QueryTable mSheet.Cells.Clear If (FileOrDirExists(measurementFile)) Then Set query = mSheet.QueryTables.add( _ Connection:="TEXT;" + measurementFile, _ Destination:=mSheet.Cells(1, 1)) With query .TextFileParseType = xlDelimited .TextFileSpaceDelimiter = True .TextFileTabDelimiter = True .TextFileDecimalSeparator = "," .Refresh End With End If mSheet.Columns.AutoFit End Sub

I was wondering if there is something similar in Perl using OLE. I do not wish to use any extra libraries like Text::CSV etc. Is there some way where i can define the 'List separtor' as a comma and the 'Decimal separator' as point!!

Any answers or help is much appreciated folks :) And oh yes! I use Win32::OLE and i was hoping there was some way to define the List separator (I noticed that Win32::OLE::Variant allows for decimal separator but i could not spot anything for List separator)


In reply to Semicolon delimited to Comma delimited by swatzz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.