+ Reply to Thread
Results 1 to 5 of 5

Importing a CSV File

  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Importing a CSV File

    Hi,

    I am trying to create a Save/Load functionality for a range on a worksheet I'm developing. The user would click save, and this would export the range to a CSV file and save it. Then later they could click load and it would import that CSV file into the same range. I have the export ("save") part figured out, but I'm struggling with the import (load) code. I've included a simple sample worksheet to work with.

    Any help would be much appreciated!Saving File Example.xlsm

  2. #2
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Importing a CSV File

    I've changed your default path. You can try this code:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-03-2012
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Importing a CSV File

    Thanks for your reply ThePower777 - That code does work, but there is a little hiccup for me - I should have included a better example sheet.

    This updated one shows my problem, there is a formula cell in the middle of the range that does not need to be copied (it aggregates the cells above it), so that when the data is imported your way - plus one row at a time, it overwrites that cell, and isn't in the correct location. See attached file. Saving File Example.xlsm

  4. #4
    Registered User
    Join Date
    06-20-2012
    Location
    PA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Importing a CSV File

    In this case if you have predefined rows as formula you can use:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-03-2012
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Importing a CSV File

    Thanks! That works!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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