+ Reply to Thread
Results 1 to 13 of 13

Modify closed csv file without open it

  1. #1
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Modify closed csv file without open it

    Hi excel and vba experts

    On desktop I have csv file called 1.csv and has a column separated by comma
    I wanted a code that open the csv file and modify it so as to make the column into multiple columns by comma then save the changes and close the csv file

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    Hi,

    it could be possible … Once you well elaborate the process to be executed rather than such a guessing challenge as guessing can't be coding !

  3. #3
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    Hi Marc L sir
    I thought it is clear. I attach a file (column with data and need each part between commas to be in columns)
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    Quote Originally Posted by KingTamo View Post
    I thought it is clear.
    So according to your 'clear' initial post my reply is just well answer to the Import Assistant when you open the file from Excel …

  5. #5
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    I didn't get your answer sir. Can you tell me most details?

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    Just open the file from Excel then well answer to the Import Assistant.
    If you don't see any Import Assistant then rename the file as .txt and retry …

  7. #7
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    I can't see the Import Assistant. I wanted a code in another xlsm file that opens the csv and modify it to several columns then save the csv and close it

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    Read again post #6 but well this time …

  9. #9
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    I read it well but I don't want to import it the xlsm file.
    in simple steps: the code opens the closed csv file called 1.csv - separate each data between commas to several columns - save the csv file - close the csv file

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    Yes once the file is amended under Excel according to your expectation you can save it and close it.
    See the VBA help of the OpenText method …
    Last edited by Marc L; 03-05-2022 at 10:12 AM.

  11. #11
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    Thanks. I have searched for opentext on google and can solve the first step
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    11-24-2016
    Location
    Libya
    MS-Off Ver
    Office 365
    Posts
    526

    Re: Modify closed csv file without open it

    Now I need to separate the one column to several columns and this depend at comma ,

  13. #13
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Modify closed csv file without open it


    You can use the Text To Columns Excel feature from the Data menu aka TextToColumns method under VBA, easy with the Macro Recorder …

+ 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. Using VBA to open a closed excel file
    By KColgrove in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2019, 01:22 AM
  2. i was using this code to open an exe file how can i modify it to open a .htm file
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-05-2018, 03:05 PM
  3. [SOLVED] strange sumifs problem, works with file open, #value with file closed
    By neowok in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2013, 05:32 AM
  4. Problem not wanting to open a file with modify file password...
    By JamesPrice in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 03:37 PM
  5. Check if file is open and open if closed
    By Jockster in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-22-2010, 08:18 AM
  6. automatically open a file with excel closed
    By juanjose in forum Excel General
    Replies: 2
    Last Post: 08-26-2009, 12:07 PM
  7. Loop through, open, and modify all workbooks in file
    By Jason in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2005, 05:05 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