diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2015-12-06 18:09:10 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2015-12-06 18:09:10 +0100 |
commit | 0daed9b52fb74b090295a8e079664956785e02c2 (patch) | |
tree | 6668bbceb71b5242516d13c4da68ba5da60987ff /wizards | |
parent | 77801cd501af08f41099feef36a72001ee6c84b4 (diff) |
Access2Base - First steps OutPutTo calc and csv
+ bug correction on dlgFormat dialog - check user input
Change-Id: I126f99dbc587342772a601df8b9dd03cfe4850ac
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/access2base/Database.xba | 11 | ||||
-rw-r--r-- | wizards/source/access2base/DoCmd.xba | 8 | ||||
-rw-r--r-- | wizards/source/access2base/acConstants.xba | 3 |
3 files changed, 16 insertions, 6 deletions
diff --git a/wizards/source/access2base/Database.xba b/wizards/source/access2base/Database.xba index dacf29f597d8..c4a674c566a8 100644 --- a/wizards/source/access2base/Database.xba +++ b/wizards/source/access2base/Database.xba @@ -605,7 +605,12 @@ Const cstThisSub = "Database.OutputTo" If IsMissing(pvOutputFormat) Then pvOutputFormat = "" If Not Utils._CheckArgument(pvOutputFormat, 3, vbString) Then Goto Exit_Function If pvOutputFormat <> "" Then - If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array(UCase(acFormatHTML), "HTML", "")) _ + If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array( _ + UCase(acFormatHTML), "HTML" _ + , UCase(acFormatXLS), "XLS" _ + , UCase(acFormatCALC), "ODS" _ + , UCase(acFormatTXT), "TXT", "CSV" _ + , "")) _ Then Goto Exit_Function ' A 2nd time to allow case unsensitivity End If If IsMissing(pvOutputFile) Then pvOutputFile = "" @@ -637,7 +642,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp If pvOutputFormat = "" Then sOutputFormat = _PromptFormat() ' Prompt user for format If sOutputFormat = "" Then Goto Exit_Function - If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array(UCase(acFormatHTML), "HTML", "")) _ + If Not Utils._CheckArgument(UCase(sOutputFormat), 3, vbString, Array(UCase(acFormatHTML), "HTML", "")) _ Then Goto Exit_Function ' Today only value, later maybe Calc ? Else sOutputFormat = UCase(pvOutputFormat) @@ -655,7 +660,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp 'Create file bOutput = _OutputToHTML(oTable, sOutputFile, pvTemplateFile) - Set oTable = Nothing + oTable.Dispose() 'Launch application, if requested If bOutput Then diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba index a10e6246e567..4af47feeca3e 100644 --- a/wizards/source/access2base/DoCmd.xba +++ b/wizards/source/access2base/DoCmd.xba @@ -1212,8 +1212,9 @@ Public Function OutputTo(ByVal pvObjectType As Variant _ , ByVal Optional pvEncoding As Variant _ , ByVal Optional pvQuality As Variant _ ) As Boolean -'Supported: acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for forms -' acFormatHTML for tables and queries +REM https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options +'Supported: acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for forms +' acFormatHTML, acFormatXLS, acFormatCALC, acFormatTXT for tables and queries If _ErrorHandler() Then On Local Error Goto Error_Function Const cstThisSub = "OutputTo" @@ -1229,7 +1230,8 @@ Const cstThisSub = "OutputTo" If pvOutputFormat <> "" Then If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array( _ UCase(acFormatPDF), UCase(acFormatODT), UCase(acFormatDOC), UCase(acFormatHTML) _ - , "PDF", "ODT", "DOC", "HTML", "" _ + , UCase(acFormatXLS), UCase(acFormatCALC), UCase(acFormatTXT) _ + , "PDF", "ODT", "DOC", "HTML", "XLS", "ODS", "TXT", "CSV", "" _ )) Then Goto Exit_Function ' A 2nd time to allow case unsensitivity End If If IsMissing(pvOutputFile) Then pvOutputFile = "" diff --git a/wizards/source/access2base/acConstants.xba b/wizards/source/access2base/acConstants.xba index 3f30ba00f609..89ac72b26fb3 100644 --- a/wizards/source/access2base/acConstants.xba +++ b/wizards/source/access2base/acConstants.xba @@ -287,6 +287,9 @@ Global Const acFormatPDF = "writer_pdf_Export" Global Const acFormatODT = "writer8" Global Const acFormatDOC = "MS Word 97" Global Const acFormatHTML = "HTML" +Global Const acFormatXLS = "MS Excel 97" +Global Const acFormatCALC = "StarOffice XML (Calc)" +Global Const acFormatTXT = "Text - txt - csv (StarCalc)" REM AcExportQuality REM ----------------------------------------------------------------- |