summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2015-12-06 18:09:10 +0100
committerJean-Pierre Ledure <jp@ledure.be>2015-12-06 18:09:10 +0100
commit0daed9b52fb74b090295a8e079664956785e02c2 (patch)
tree6668bbceb71b5242516d13c4da68ba5da60987ff /wizards
parent77801cd501af08f41099feef36a72001ee6c84b4 (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.xba11
-rw-r--r--wizards/source/access2base/DoCmd.xba8
-rw-r--r--wizards/source/access2base/acConstants.xba3
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 = &quot;Database.OutputTo&quot;
If IsMissing(pvOutputFormat) Then pvOutputFormat = &quot;&quot;
If Not Utils._CheckArgument(pvOutputFormat, 3, vbString) Then Goto Exit_Function
If pvOutputFormat &lt;&gt; &quot;&quot; Then
- If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
+ If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array( _
+ UCase(acFormatHTML), &quot;HTML&quot; _
+ , UCase(acFormatXLS), &quot;XLS&quot; _
+ , UCase(acFormatCALC), &quot;ODS&quot; _
+ , UCase(acFormatTXT), &quot;TXT&quot;, &quot;CSV&quot; _
+ , &quot;&quot;)) _
Then Goto Exit_Function &apos; A 2nd time to allow case unsensitivity
End If
If IsMissing(pvOutputFile) Then pvOutputFile = &quot;&quot;
@@ -637,7 +642,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp
If pvOutputFormat = &quot;&quot; Then
sOutputFormat = _PromptFormat() &apos; Prompt user for format
If sOutputFormat = &quot;&quot; Then Goto Exit_Function
- If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
+ If Not Utils._CheckArgument(UCase(sOutputFormat), 3, vbString, Array(UCase(acFormatHTML), &quot;HTML&quot;, &quot;&quot;)) _
Then Goto Exit_Function &apos; 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
&apos;Create file
bOutput = _OutputToHTML(oTable, sOutputFile, pvTemplateFile)
- Set oTable = Nothing
+ oTable.Dispose()
&apos;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
-&apos;Supported: acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for forms
-&apos; acFormatHTML for tables and queries
+REM https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
+&apos;Supported: acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for forms
+&apos; acFormatHTML, acFormatXLS, acFormatCALC, acFormatTXT for tables and queries
If _ErrorHandler() Then On Local Error Goto Error_Function
Const cstThisSub = &quot;OutputTo&quot;
@@ -1229,7 +1230,8 @@ Const cstThisSub = &quot;OutputTo&quot;
If pvOutputFormat &lt;&gt; &quot;&quot; Then
If Not Utils._CheckArgument(UCase(pvOutputFormat), 3, vbString, Array( _
UCase(acFormatPDF), UCase(acFormatODT), UCase(acFormatDOC), UCase(acFormatHTML) _
- , &quot;PDF&quot;, &quot;ODT&quot;, &quot;DOC&quot;, &quot;HTML&quot;, &quot;&quot; _
+ , UCase(acFormatXLS), UCase(acFormatCALC), UCase(acFormatTXT) _
+ , &quot;PDF&quot;, &quot;ODT&quot;, &quot;DOC&quot;, &quot;HTML&quot;, &quot;XLS&quot;, &quot;ODS&quot;, &quot;TXT&quot;, &quot;CSV&quot;, &quot;&quot; _
)) Then Goto Exit_Function &apos; A 2nd time to allow case unsensitivity
End If
If IsMissing(pvOutputFile) Then pvOutputFile = &quot;&quot;
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 = &quot;writer_pdf_Export&quot;
Global Const acFormatODT = &quot;writer8&quot;
Global Const acFormatDOC = &quot;MS Word 97&quot;
Global Const acFormatHTML = &quot;HTML&quot;
+Global Const acFormatXLS = &quot;MS Excel 97&quot;
+Global Const acFormatCALC = &quot;StarOffice XML (Calc)&quot;
+Global Const acFormatTXT = &quot;Text - txt - csv (StarCalc)&quot;
REM AcExportQuality
REM -----------------------------------------------------------------