![]() |
Removing DATA Connections
I have a macro which imports a .csv file in Excel 2003. We do it once a
day. When I open the sheet in Excel 2007, I see that Data connections are building up daily. The macro looks like this... Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\Da ta-store\UPS_CSV_EXPORT.csv", Destination:=rng) .Name = "UPS_CSV_EXPORT" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With Set rng = Nothing How can I delete these connections with Excel 2003? I cannot even find the dialog to view them. -- Thanks! |
Removing DATA Connections
Anyone?
"Saucer Man" wrote in message ... I have a macro which imports a .csv file in Excel 2003. We do it once a day. When I open the sheet in Excel 2007, I see that Data connections are building up daily. The macro looks like this... Set rng = Cells(Rows.Count, 1).End(xlUp).Offset(1, 0) With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\Da ta-store\UPS_CSV_EXPORT.csv", Destination:=rng) .Name = "UPS_CSV_EXPORT" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = False .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = False .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = True .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With Set rng = Nothing How can I delete these connections with Excel 2003? I cannot even find the dialog to view them. -- Thanks! |
All times are GMT +1. The time now is 07:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com