extract_pnc - convert to write straight to csv fiels

This commit is contained in:
Paul Trowbridge 2017-07-07 17:42:47 -04:00
parent e0a7c15cfe
commit 317324a342

43
FL.bas
View File

@ -128,18 +128,33 @@ Sub ExtractPNC_CSV()
End If
Next i
Set wb = Workbooks.Add
wb.Sheets.Add
Set sh1 = wb.Sheets("Sheet1")
Set sh2 = wb.Sheets("Sheet2")
sh1.Name = "Collateral"
sh2.Name = "Balance"
ReDim Preserve col(11, j - 2)
ReDim Preserve bal(8, m - 1)
Call x.SHTp_Dump(col, sh1.Name, 1, 1, True, True, 1, 4, 5, 6, 7, 8, 9, 10, 11)
Call x.SHTp_Dump(bal, sh2.Name, 1, 1, True, True, 1, 2, 5, 6, 7, 8)
' Set wb = Workbooks.Add
' wb.Sheets.Add
' Set sh1 = wb.Sheets("Sheet1")
' Set sh2 = wb.Sheets("Sheet2")
' sh1.Name = "Collateral"
' sh2.Name = "Balance"
sh1.range("A1").CurrentRegion.Columns.AutoFit
sh2.range("A2").CurrentRegion.Columns.AutoFit
If Not x.FILEp_CreateCSV("C:\users\ptrowbridge\downloads\col.csv", col) Then
MsgBox ("error")
End If
If Not x.FILEp_CreateCSV("C:\users\ptrowbridge\downloads\bal.csv", bal) Then
MsgBox ("error")
End If
' Call x.SHTp_Dump(col, sh1.Name, 1, 1, True, True, 1, 4, 5, 6, 7, 8, 9, 10, 11)
' Call x.SHTp_Dump(bal, sh2.Name, 1, 1, True, True, 1, 2, 5, 6, 7, 8)
'
' sh1.range("A1").CurrentRegion.Columns.AutoFit
' sh2.range("A2").CurrentRegion.Columns.AutoFit
'
' If Not x.FILEp_CreateCSV("C:\users\ptrowbridge\downloads\col.csv", col) Then
' MsgBox ("error")
' End If
End Sub
@ -524,3 +539,11 @@ Sub SetPivotShortcutKeys()
Call Application.MacroOptions("PERSONAL.xlsb!ExpandPvtItem", "", , , , "X")
End Sub
Sub LoadChan()
'if not x.ADOp_OpenCon(0,
End Sub