+ Reply to Thread
Results 1 to 2 of 2

File Conversion VBA

  1. #1
    Registered User
    Join Date
    03-16-2022
    Location
    Seattle, Washington
    MS-Off Ver
    Professional Plus 2019
    Posts
    1

    Question File Conversion VBA

    Hi all,

    I'm hoping someone is particularly expert with VBA to help with this...

    Context:
    I have multiple SQL jobs whose outputs are transformed through a template Excel file output.
    There are multiple Excel file outputs, each with one visible tab (aggregates data) that needs to be copied to a new workbook, converting cell contents from formulas to values (for upload elsewhere).
    The end goal is to convert these larger workbooks into single-tab XLSX (cannot be CSV) files that contain only values (not formulas), deleting the original workbooks if possible.

    I need to create a macro that does this:
    • On run:
    • Open folder selection menu
    • For each workbook in selected folder...
    • get active sheet for each file
    • copy values (not formulas) from each file's active sheet to a new workbook (1:1, not combined, not CSV)
    • Finally, delete original file.

    I've got a couple macros that can do some conversions (convert from XLS to CSV, CSV to XLS...) but having trouble unifying it all, especially with any sort of delete function after file conversion.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: File Conversion VBA

    Instead of copying the original file as values and then deleting the original, the macro could convert the formulas in the original to values and resave the original.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. ods to xls file conversion
    By ikshanu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2016, 03:51 AM
  2. conversion of text file(delimited) into Excel file using macro
    By thara.p24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2014, 08:35 AM
  3. [SOLVED] XML file conversion to Excel file using macro
    By thara.p24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2014, 06:47 AM
  4. Replies: 2
    Last Post: 06-26-2014, 03:24 PM
  5. [SOLVED] xlw. file conversion
    By FangYR in forum Excel General
    Replies: 0
    Last Post: 02-11-2006, 08:45 AM
  6. .csv file conversion
    By Amber_D_Laws in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-26-2006, 10:29 AM
  7. MAC file conversion
    By gotobethlehem in forum Excel General
    Replies: 0
    Last Post: 12-27-2005, 07:20 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