+ Reply to Thread
Results 1 to 5 of 5

Saving specific sheet as CSV UTF-8

  1. #1
    Forum Contributor
    Join Date
    07-24-2024
    Location
    Canada
    MS-Off Ver
    365
    Posts
    126

    Saving specific sheet as CSV UTF-8

    Hi,

    I currently have this code :

    Attaching the file file test.xlsb

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    What it does is save my Data sheet in CSV without the header row (first row). Everything works fine, except that I wish to change it to CSV UTF-8. Unfortunately, as it is currently I am unable to use the file unless I save it manually as CSV UTF-8.

    Also this part is optional but it would be nice to have. When I click the button - It opens a dialog box prompting to choose the folder to save the file as. The filename is inside the C2 cell, so it will save as C2value.csv . The second part is fine, because if I want to create a dynamic filepath, I can do that and simply type in the path that I want to use (A2 as an example, but it will be replaced with a formula). However, if I want to create a dynamic filepath, I would like to make to be able to easily remove the dialog box (comment out), because there will be no point in selecting the folder if the path is chosen automatically... I don't like the current implimentation because it doesn't allow me to see files in the folder, only folders.

    How can I edit my current code... or I can just replace my current code with something more efficient, to accomplish what I am trying to do ?

    Thank you !
    Last edited by MasterBash; 11-26-2024 at 10:54 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: Saving specific sheet as CSV UTF-8

    Try this code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Mark Thread as Solved...

  3. #3
    Forum Contributor
    Join Date
    07-24-2024
    Location
    Canada
    MS-Off Ver
    365
    Posts
    126

    Re: Saving specific sheet as CSV UTF-8

    I had a chance to thoroughly test it out yesterday and today. It works really well. Thank you !

  4. #4
    Valued Forum Contributor
    Join Date
    02-04-2017
    Location
    chennai
    MS-Off Ver
    MS OFFICE 365
    Posts
    440

    Re: Saving specific sheet as CSV UTF-8

    thanks for you repu

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,344

    Re: Saving specific sheet as CSV UTF-8

    Absolutely nothing wrong with sudbhavani's code but since you are using a Table for your data I'd suggest you use the Table Object Properties to determine rows and columns to write csv lines.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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] Saving a certain sheet out of workbook to a specific folder
    By nettadecoco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-27-2022, 04:02 AM
  2. [SOLVED] Saving specific columns in a sheet as a PDF file
    By Zahid0111 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-05-2020, 01:37 PM
  3. Saving Specific Sheet With VBA
    By dxzaber in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2019, 09:33 AM
  4. Saving a specific sheet from workbook and leaving only one specific module in it.
    By Beginner1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2019, 06:00 PM
  5. [SOLVED] Saving to a specific column in a second sheet
    By anthony1312002 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2018, 02:43 PM
  6. Saving specific Sheet as CSV in the current location of the workbook
    By saif87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2016, 07:00 AM
  7. Saving a sheet to a specific folder
    By kmraz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2013, 08:43 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