Results 1 to 4 of 4

Opening CSV File & It Removes Spaces From Date Columns?

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Opening CSV File & It Removes Spaces From Date Columns?

    Hello
    When I open a downloaded csv file with vba it shows the the date & time in the correct format for the month that appears at the top of the column. The column comes formatted in dd/mm/yyyy hh:mm. Scroll down to where the next month starts & the date & time appear as text on the left of the column, but still displaying almost the same. After looking at it I noticed that there are 2 spaces between the date & time for the top rows & where it changes month, one of the spaces is removed & it displays as text. Enter another blank space & it then displays correctly as a date. Open the csv file manually & this doesn't happen.
    I've tried saving as xlsx & it's still the same scenario.
    The vba to open it is Workbooks.Open Filename:= Path & Filename & I've tried Workbooks.Open(Path & Filename)
    Both with the same result. As soon as it's open, it's ok for the latest month, after that & at the change of date between months, it displays as text
    Any ideas why?

    Thanks
    Last edited by Philb1; 10-10-2013 at 04:21 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Hide columns at opening of file with macro
    By FlyFisherman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2013, 02:35 PM
  2. UserForm - vba errors only when opening Excel file from Spaces site
    By dannyboy1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2013, 01:36 PM
  3. Replies: 0
    Last Post: 10-22-2012, 06:52 PM
  4. Save as .csv file removes trailing 00
    By Geir Holme in forum Excel General
    Replies: 2
    Last Post: 09-12-2005, 06:05 AM
  5. Renaming File Removes Worksheets
    By Dustin D. Cook in forum Excel General
    Replies: 2
    Last Post: 04-07-2005, 06:06 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