+ Reply to Thread
Results 1 to 5 of 5

cannot save csv as xls or xlsx

  1. #1
    Registered User
    Join Date
    10-06-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    8

    cannot save csv as xls or xlsx

    I just started learning excel macros.

    I have a bunch of csv files which I was able to manipulate with a macro for the desired output. I tried to save the final csv files as xls files. If I auto closed all the active workbooks, xls files were saved, but somehow they do not contain the desired output data generated by the macro. If I left the active workbooks open, I can see the desired output data in each file. I must now use "save as" and change the format manually from csv to xls or xlsx and then save the files one by one.

    Below is the final portion of my macro:
    ________________________________________________________________________________________________________________
    Please Login or Register  to view this content.
    ________________________________________________________________________________________________________________
    I wonder what did I do wrong. Also with the above, the xls files are saved to the c:\ root. I would like to save them to a designated folder instead.

    Much appreciate if any one can help.

    Thank you very much!
    Henry
    Last edited by alansidman; 10-06-2014 at 07:33 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: cannot save csv as xls or xlsx

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: cannot save csv as xls or xlsx

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    10-06-2014
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    8

    Re: cannot save csv as xls or xlsx

    Hi shg
    This works like magic. Thank you very much!
    Henry

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: cannot save csv as xls or xlsx

    You're welcome.

+ 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] Save as .xlsx and .txt
    By MarcoNecroX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2013, 08:56 PM
  2. Replies: 1
    Last Post: 09-12-2013, 10:36 PM
  3. Replies: 6
    Last Post: 08-28-2012, 03:51 AM
  4. how to save .xlsm fie as .xlsx
    By Blue_kul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2012, 10:38 PM
  5. Excel 2007 : Prevent xlsx re-save
    By RickSeymour in forum Excel General
    Replies: 1
    Last Post: 05-14-2008, 09:16 AM

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