Skip to content

Commit

Permalink
Bumped to v0.25
Browse files Browse the repository at this point in the history
  • Loading branch information
PGS62 committed Nov 28, 2022
1 parent e26962c commit fe63154
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 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
211 28-Nov-2022 09:49 Philip Swannell Bumped to v0.25
210 28-Nov-2022 09:37 Philip Swannell Refactored CSVWrite.
209 27-Nov-2022 16:13 Philip Swannell Changes in release 208 seem to have more than doubled the speed for CSVWrite for large files. Average time to execute CSVWrite(Data, FileName) when Data is obtained from RDataSets file military.csv (1.4 million rows, 7 cols) falls from 24 seconds to 11 seconds.
208 27-Nov-2022 15:39 Philip Swannell Changes to CSVWrite, with hope of improved performance, but not yet tested.
Expand Down
Binary file modified vba/VBA-CSV.xlsm/VBA-CSV.xlsm
Binary file not shown.
6 changes: 4 additions & 2 deletions vba/VBA-CSV.xlsm/modCSVReadWrite.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,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.24
' This version at: https://github.com/PGS62/VBA-CSV/releases/tag/v0.25

'Installation:
'1) Import this module into your project (Open VBA Editor, Alt + F11; File > Import File).
Expand All @@ -25,7 +25,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.24/VBA-CSV-Intellisense.xlsx
' https://github.com/PGS62/VBA-CSV/releases/download/v0.25/VBA-CSV-Intellisense.xlsx
' into the workbook that contains this VBA code.

Option Explicit
Expand Down Expand Up @@ -2921,6 +2921,8 @@ Public Function CSVWrite(ByVal Data As Variant, Optional ByVal FileName As Strin
Optional ByVal DateTimeFormat As String = "ISO", Optional ByVal Delimiter As String = ",", _
Optional ByVal Encoding As String = "ANSI", Optional ByVal EOL As String = vbNullString, _
Optional TrueString As String = "True", Optional FalseString As String = "False") As String
Attribute CSVWrite.VB_Description = "Creates a comma-separated file on disk containing Data. Any existing file of the same name is overwritten. If successful, the function returns FileName, otherwise an ""error string"" (starts with `#`, ends with `!`) describing what went wrong."
Attribute CSVWrite.VB_ProcData.VB_Invoke_Func = " \n14"

Const Err_Delimiter1 = "Delimiter must have at least one character"
Const Err_Delimiter2 As String = "Delimiter cannot start with a " & _
Expand Down
Binary file modified workbooks/VBA-CSV.xlsm
Binary file not shown.

0 comments on commit fe63154

Please sign in to comment.