Christian, 

You're right. My attempt to fool with options didn't work at first because I 
misidentified the file's character set, so I thought the "csv" in the filter 
name was significant and embarked on the quest to convert to CSV.

Now that I have the right character set, everything works perfectly!!!

I have put up a post on SAP's community network site to let others know it's 
possible to export from Business One to LibreOffice; hopefully it will help the 
switchers out there. I start my post off by publicly thanking you and Eduardo.

If you'd like to see the post, it's at: http://scn.sap.com/thread/3325286

That post contains full instructions on how to modify AutoOpen.xls. But for 
those who want to cut right to the chase without reading it, here's the 
subroutine LibreOffice can use to open a tab-separated text file output by SAP 
Business One:

Public Sub StarOpenTsvFile(tsvPath As String)
    Dim starDesktop As Object
    Dim url As String
    Dim doc As Object
    Dim parms(1) As New com.sun.star.beans.PropertyValue
    parms(0).Name = "FilterName"
    parms(0).Value = "Text - txt - csv (StarCalc)" ' Name is incorrect, but 
required
    parms(1).Name = "FilterOptions"
    parms(1).Value = "9,,65535,1" ' Tab seps, no string delim, UTF-16 charset, 
begin at line 1
    starDesktop = createUnoService("com.sun.star.frame.Desktop")
    url = ConvertToUrl(tsvPath)
    doc = starDesktop.loadComponentFromURL(url, "_blank", 0, parms)
End Sub


Thanks again!

--

Charles


-- 
Unsubscribe instructions: E-mail to discuss+h...@documentfoundation.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.documentfoundation.org/www/discuss/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to