Apache OpenOffice (AOO) Bugzilla – Issue 79469
insertAtPosition ignores CSV filter options
Last modified: 2013-02-07 21:51:09 UTC
Using the insertAtPosition methods in a VB macro seems to ignore the CSV filter options. A call like this: Document.AreaLinks.insertAtPosition(Position, SURL, STab, "Text - txt - csv (StarCalc)", "44,34,SYSTEM,1,1/1/2/10/3/10/4/10/5/10/6/10/7/10") always use the default filter options, no matter how the filter options are set. A similar call made using the loadComponentFromURL: NDocument = StarDesktop.loadComponentFromURL(SURL, "_blank", 0,Array (MakePropertyValue("FilterName", "Text - txt - csv (StarCalc)"),MakePropertyValue ("FilterOptions", "44,34,SYSTEM,1,1/1/2/10/3/10/4/10/5/10/6/10/7/10"),MakeProper tyValue("Hidden", False))) applies the correct filter options, so I'm pretty sure that it isn't a problem in the filter options specifications.
I tried also with the Link function of the sheet object. With it the filter options work properly, so I've been able to create a work around for the insertAtPosition function by linking a temporary sheet and then copying to the final position.
dindy, could you, please, provide file with macro and sample .csv? Thanks.
I'll do it as soon as possible, I'm a bit busy now. BTW I was simply downloading Yahoo Stock Quotes. See for example: http://ichart.yahoo.com/table.csv?s=% 5ESTOXX50E&a=05&b=6&c=2006&d=11&e=17&f=2007&g=d&ignore=.csv
The bug is present in 1.1.5 and 2.4.0. I will attach a CSV file and a document with macros showing the problem.
Created attachment 53630 [details] Document with macros importing a CSV
Created attachment 53631 [details] Sample of simple CSV file
Confirming with 2.4 on WinXP - as described. P.S. You need to put CSVexample.txt in "C:\Docs OpenOffice" or adjust path in macro accordingly. bmarcelly, thanks a ton for this clear example!
same on OOo 3.2 m68