Skip to content

Commit

Permalink
trivial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PGS62 committed Oct 26, 2023
1 parent 241007c commit 74586b7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
1 change: 1 addition & 0 deletions vba/VBA-CSV.xlsm/AuditSheetComments.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version Date Time Author Comment
247 26-Oct-2023 12:18 Philip Swannell Code comments only.
246 26-Oct-2023 11:57 Philip Swannell CSVWrite now supports "Raw" as value for QuoteAllStrings argument.
245 26-Oct-2023 09:49 Philip Swannell Added tests 272 to 274 to test behaviour of new "K" option to ConvertTypes. Updated "docstrings" for CSVRead and CSVWrite. Updated method RegisterCSVRead.
244 23-Oct-2023 16:34 Philip Swannell Rebased tests 178, 207 & 208. Necessary thanks to changes in file https://vincentarelbundock.github.io/Rdatasets/csv/carData/TitanicSurvival.csv. Example changes: top left element was null string is now text "rownames", yes and no previously appeared quoted, now unquoted.
Expand Down
Binary file modified vba/VBA-CSV.xlsm/VBA-CSV.xlsm
Binary file not shown.
1 change: 0 additions & 1 deletion vba/VBA-CSV.xlsm/VBA/modCSVPerformanceLowLevel.bas
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ End Sub
Private Sub SpeedTest_CastISO8601()

Const N As Long = 5000000
Dim Converted As Boolean
Dim DtOut As Date
Dim Expected As Date
Dim i As Long
Expand Down
26 changes: 2 additions & 24 deletions vba/VBA-CSV.xlsm/VBA/modCSVReadWrite.bas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Attribute VB_Name = "modCSVReadWrite"
' Copyright (C) 2021 - Philip Swannell
' License MIT (https://opensource.org/licenses/MIT)
' Document: https://github.com/PGS62/VBA-CSV#readme
' This version at: https://github.com/PGS62/VBA-CSV/releases/tag/v0.28
' This version at: https://github.com/PGS62/VBA-CSV/releases/tag/v0.29

'Installation:
'1) Import this module into your project (Open VBA Editor, Alt + F11; File > Import File).
Expand All @@ -26,7 +26,7 @@ Attribute VB_Name = "modCSVReadWrite"
'4) An alternative (or additional) approach to providing help on CSVRead and CSVWrite is:
' a) Install Excel-DNA Intellisense. See https://github.com/Excel-DNA/IntelliSense#getting-started
' b) Copy the worksheet _Intellisense_ from
' https://github.com/PGS62/VBA-CSV/releases/download/v0.28/VBA-CSV-Intellisense.xlsx
' https://github.com/PGS62/VBA-CSV/releases/download/v0.29/VBA-CSV-Intellisense.xlsx
' into the workbook that contains this VBA code.

'5) If you envisage calling CSVRead and CSVWrite only from VBA code and not from worksheet formulas
Expand Down Expand Up @@ -3376,28 +3376,6 @@ ErrHandler:
21 ReThrow "MakeEncoder", Err
End Function

'TODO Delete this method
Function Encode2(x As String, QuoteSimpleStrings As Boolean, QuoteComplexStrings As Boolean)
Const Delim As String = ","
3 If Not QuoteComplexStrings Then
4 Encode2 = x
5 ElseIf InStr(x, DQ) > 0 Then
6 Encode2 = DQ & Replace$(x, DQ, DQ2) & DQ
7 ElseIf QuoteSimpleStrings Then
8 Encode2 = DQ & x & DQ
9 ElseIf InStr(x, vbCr) > 0 Then
10 Encode2 = DQ & x & DQ
11 ElseIf InStr(x, vbLf) > 0 Then
12 Encode2 = DQ & x & DQ
13 ElseIf InStr(x, Delim) > 0 Then
14 Encode2 = DQ & x & DQ
15 Else
16 Encode2 = x
17 End If

End Function


' -----------------------------------------------------------------------------------------------------------------------
' Procedure : Encode
' Purpose : Encode arbitrary value as a string, sub-routine of CSVWrite.
Expand Down
Binary file modified workbooks/VBA-CSV.xlsm
Binary file not shown.

0 comments on commit 74586b7

Please sign in to comment.