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+help@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
Context
- Re: [tdf-discuss] Macro Difficulties · Charles Jenkins
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.