diff options
-rw-r--r-- | wizards/source/access2base/Database.xba | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index 2398de89fd5f..52aafa0cafa5 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -1010,6 +1010,23 @@ Error_Function: End Function ' DFunction V1.1.0 REM ----------------------------------------------------------------------------------------------------------------------- +Private Function _FilterOptionsDefault() As String +' Return the default FilterOptions string for table/query export to csv + +Dim sFieldSeparator as string +Const cstComma = "," +Const cstTextDelimitor = """" +Const cstCharacterSet = 76 ' Unicode (UTF-8) + + If _DecimalPoint() = "," Then sFieldSeparator = ";" Else sFieldSeparator = cstComma + _FilteroptionsDefault = Trim(Str(Asc(sFieldSeparator))) _ + & cstComma & Trim(Str(Asc(cstTextDelimitor))) _ + & cstComma & Trim(Str(cstCharacterSet)) _ + & cstComma & "1" + +End Function ' _FilterOptionsDefault V1.4.0 + +REM ----------------------------------------------------------------------------------------------------------------------- Public Function _hasRecordset(ByVal psName As String) As Boolean ' Return True if psName if in the collection of Recordsets @@ -1282,6 +1299,7 @@ End Function ' _OutputStringToHTML V1.4.0 REM ----------------------------------------------------------------------------------------------------------------------- Private Function _OutputToCalc(poData As Object, ByVal psOutputFile As String, psFilter As String) As Boolean ' https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Database_Import +' https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options Dim oCalcDoc As Object, oSheet As Object, vWin As Variant Dim vImportDesc() As Variant, iSource As Integer @@ -1332,6 +1350,7 @@ Dim oRange As Object, i As Integer, iCol As Integer, oColumns As Object oCalcDoc.storeAsUrl(psOutputFile, Array( _ _MakePropertyValue("FilterName", psFilter) _ + , _MakePropertyValue("FilterOptions", _FilterOptionsDefault()) _ , _MakePropertyValue("Overwrite", True) _ )) oCalcDoc.close(False) |