+ Reply to Thread
Results 1 to 4 of 4

Batch converting XLSX to CSV - I want to retain leading zeros

  1. #1
    Registered User
    Join Date
    09-04-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Batch converting XLSX to CSV - I want to retain leading zeros

    Hello everyone,

    Very new to the forum - I have a specific issue with a piece of "off-the-shelf" code, in that I need to retain zeros when batch converting XLSX to CSV. The problem is that I have dates and times in the XLSX files that need to have their first 0 kept (e.g. 00:10 becomes 0:10).

    This is my code currently:

    Please Login or Register  to view this content.

    Can anyone help?

    Thanks very much in advance for your time and efforts. x
    Last edited by alansidman; 09-04-2020 at 08:48 AM.

  2. #2
    Registered User
    Join Date
    09-04-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Re: Batch converting XLSX to CSV - I want to retain leading zeros

    See attached for my current workbook
    Attached Files Attached Files

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

    Re: Batch converting XLSX to CSV - I want to retain leading zeros

    Code Tags Added
    Your post does not comply with Rule 2 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



    (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

  4. #4
    Registered User
    Join Date
    09-04-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    3

    Re: Batch converting XLSX to CSV - I want to retain leading zeros

    Sorry to bump this thread, but does anyone know how I might be able to solve this issue?

+ 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. leading zeros and retain number after rid of decimal
    By laundry in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2017, 05:28 AM
  2. How to retain leading zeros when converting to .csv.
    By Allgermanparts in forum Excel General
    Replies: 2
    Last Post: 03-13-2012, 07:54 AM
  3. Retain Leading Zeros
    By BBretschneider08 in forum Excel General
    Replies: 7
    Last Post: 06-10-2009, 04:41 PM
  4. Concatenate and retain leading, trailing zeros
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2009, 11:23 AM
  5. [SOLVED] how to retain leading zeros i.e. 00001 instead of 1
    By Sue in forum Excel General
    Replies: 2
    Last Post: 08-15-2006, 07:20 PM
  6. [SOLVED] retain leading zeros when importing
    By LeePotts in forum Excel General
    Replies: 1
    Last Post: 12-05-2005, 03:25 PM
  7. retain leading zeros in number format
    By Jeff in forum Excel General
    Replies: 5
    Last Post: 02-22-2005, 06:06 PM

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