Apache OpenOffice (AOO) Bugzilla – Issue 104142
LoadComponentFromURL w/scalc: filter opens CSV as Writer doc 1st time (works thereafter)
Last modified: 2017-05-20 09:57:18 UTC
(Using oo3.1.0 OOO310m11 Build 9399 as distributed with Ubuntu Linux 9.04). In Basic code, LoadComponentFromURL using the input filter "scalc: Text - txt - csv (StarCalc)" opens a .CSV file as a Writer doc (not spreadsheet) the first time it is attempted. Subsequent executions in the same session open the .CSV as a spreadsheet as expected. I will attach a small test which demos the problem. It is a .ods spreadsheet containing a button which runs a macro. The macro opens a .CSV file and displays the Identifier of the resulting object ("com.sun.star.sheet.SpreadsheetDocument" is expected). To use the demo, download the .ods file and the "tickers.csv" file. Open the .ods file and edit A1 to contain the path to where you stored tickers.csv and then press the button. On my system, it fails the first time the button is pressed, and works on subsequent presses.
Created attachment 64051 [details] .ods with macro demonstrating the problem
Created attachment 64052 [details] Test data used by the previously-attached demo
Can't open CSV file by pressing the button, I can confirm that the path is right.
Here is the macro code from the demo, in case it triggers any ideas: Dim tickers_oDoc as Object clrargs() pusharg("FilterName", "scalc: Text - txt - csv (StarCalc)") pusharg("FilterFlags", "44,34,SYSTEM,1,1/1/1/1/1/1/1/1/1/1") pusharg("ReadOnly", True) ' pusharg("Hidden", True) tickers_oDoc = StarDesktop.LoadComponentFromURL(Url, "_blank", 0, args() )
This Issue requires more information ('needmoreinfo'), but has not been updated within the last year. Please provide feedback as requested and re-test with the the latest version of OpenOffice - the problem(s) may already be addressed. You can download Apache OpenOffice 3.4.1 from http://www.openoffice.org/download Please report back the outcome of your testing, so this Issue may be closed or progressed as necessary - otherwise the issue may be Resolved as Invalid in the future.
First open in Calc. AOO410m1(Build:9750) - Rev. 1558424 Rev.1558424 Win 7