+ Reply to Thread
Results 1 to 9 of 9

ExternalData_1 when importing CSV to workbook

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    ExternalData_1 when importing CSV to workbook

    Hi Guys,

    i am using this code to import csv into workbook:

    Please Login or Register  to view this content.
    and it is working like a charm.
    But adding not necessarry hidden named range Sheet1!ExternalData_1.
    Screenshot_112.png

    Few questions:
    1. Why?
    2. After deleting the named range i can not refresh querty table becausae connection even is still in Queriess & connections tab - it doesnt work. Why?
    3. It is better to not create this connections and delete them after import or no matter? I will have at least 50 - 100 tables imported like that.

    Please help,
    Jacek
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook

    Logically thinking:

    I do not need any connections and external data after importing CSV using presented method above.
    Query tables can not be refreshed after using importing code like that.
    can anybody confirm?

    So should I delete connection created and also named range created?
    If Yes how to do this?

    After deleting named range query table has no connection inside in VBA code and this part of code causes error:

    Please Login or Register  to view this content.
    I am getting queryTable is not valid.

    When i deleted WorkbookConnection i am getting error: Workbook Connection has been deleted.

    How to do it properly?

    p.s. powerquery is not solution for me here because i would have to build queries formulas on the fly from code and this works only from 2016 Excel

    Please help,
    Jacek
    Last edited by jaryszek; 01-21-2021 at 06:47 AM.

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook

    Up,

    Have a blessed day,
    Jacek

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook

    Anybody knows if it is correct?

    Best,
    Jacek

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook


  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: ExternalData_1 when importing CSV to workbook

    Your cross post appears to be to this thread rather than another thread on another board.

    I have noticed this before -- that Excel creates names in the name manager for these text/data imports. My only explanation is that it is a necessary part of Excel's internal architecture for dealing with these data import query tables. As one who never really uses named ranges, this hasn't impacted my work in Excel because Excel can just manage these names in the background without getting in my way. In those workbooks where I have multiple text imports/query tables, I go to extra lengths to avoid the name manager.

    What is your concern with these "unnecessary" names? In my work, those "extra" names have never interfered in my work. On rare occasions when I open the name manager, I find the name manager cluttered and difficult to sort out real, useful names and these Excel created names, but that is the only time it has been a concern to me (and it is rare for me to open the name manager).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook

    thank you MrShorty!

    The correct link for cross post is here:
    https://www.mrexcel.com/board/thread.../#post-5630330

    In those workbooks where I have multiple text imports/query tables, I go to extra lengths to avoid the name manager.
    What do you mean go with extra lenghts?
    Can you please explain more?

    These named ranges are hidden so for me it could be ok.
    But what about connection created (queries and connections tab in ribbon)?
    Do you create them? Or always delete after importing?
    If yes, how you can rebuild query? Delete all and rebuild?

    I can not delete whole table query because my formulas referencing to it will change for "#REF"...

    Best,
    Jacek

  8. #8
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: ExternalData_1 when importing CSV to workbook

    What do you mean go with extra lenghts?
    I just mean I never open the name manager and avoid using named ranges in those workbooks.
    But what about connection created (queries and connections tab in ribbon)? Do you create them? Or always delete after importing?
    I don't do anything with them. Perhaps it is my inexperience with them, but I usually find the queries and connections command/dialog to be pretty useless, so I've learned never to mess with it. I just let Excel manage query names and definitions behind the scenes.

    Are you having a specific problem that is caused by these names? Perhaps if you explain what has led to posing this question, those with more experience can comment on what you are really trying to do.

  9. #9
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: ExternalData_1 when importing CSV to workbook

    thank you!

    Yes the issue is that i will have about 50 tables or more in workbook and this will add additional 50 connections.
    Only thing that queries will create connections plus import code also so i will have huge amount of connection...

    But maybe it will not have impact on performance and i should ignore.
    Best,
    Jacek

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help Importing from another workbook and pasting multiple selection on original workbook
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2017, 12:40 AM
  2. Replies: 4
    Last Post: 06-01-2017, 11:45 PM
  3. Importing data from old workbook into updated version of same workbook
    By jontherev in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-28-2015, 10:11 AM
  4. Importing XLS workbook (3 worksheets) into Macro enabled workbook
    By c878923 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2013, 09:47 PM
  5. [SOLVED] importing the last cell in the last row from one workbook into another workbook
    By Pupabella in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 04-10-2012, 09:55 PM
  6. Importing and Exporting data from workbook to workbook in excel
    By dans123 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-09-2012, 03:40 AM
  7. [SOLVED] Importing Data from unopened Workbook into an open Workbook
    By GrayesGhost in forum Excel General
    Replies: 0
    Last Post: 03-05-2005, 08:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1