+ Reply to Thread
Results 1 to 11 of 11

xlsx to xlsm conversion

  1. #1
    Registered User
    Join Date
    09-17-2020
    Location
    New York
    MS-Off Ver
    2019
    Posts
    28

    xlsx to xlsm conversion

    Hello all,

    I am trying to automate some reports out of DBeaver. When the scripts run as a scheduled task they are put into a folder as a xlsx. If I wanted to run macros on these reports they will need to xlsm, so how can I do this conversion? Or a I missing something?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: xlsx to xlsm conversion

    Where is the code you want to run on the files located?
    If posting code please use code tags, see here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: xlsx to xlsm conversion

    If I wanted to run macros on these reports they will need to xlsm
    Why?

    A .xlsm is a macro enabled file, that is, it has macros in it. You can save a file as a .xlsm file even though it dowsn't have macros in it. Equally, you can process the data in an .xlsx OR an .xlsm file.

    Not sure why you see it as a problem. What macros are you using to process these files?
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-17-2020
    Location
    New York
    MS-Off Ver
    2019
    Posts
    28

    Re: xlsx to xlsm conversion

    This is all new to me, but I thought that if I wanted to run macos the file needed to be .xlsm. So you're saying that can run macros on a .xlsx file? Coming from DBeaver, I do not have the option the save the file as.xlsm.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: xlsx to xlsm conversion

    You have to save a file as .xlsm if it has macros in it. But, if you want your macro enabled file to process other files, they could be .xlsx, or xlsm, or even .xlsb files.

    Again, what do your macros do?

  6. #6
    Registered User
    Join Date
    09-17-2020
    Location
    New York
    MS-Off Ver
    2019
    Posts
    28

    Re: xlsx to xlsm conversion

    I just want to understand the flow so I will start small. The plan is to add 3 columns, 2 of them would have default text and the 3rd just left blank.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: xlsx to xlsm conversion

    So, you don't have any code? Ok, if you have, let's say, a master file that has your code in it, it can open any other type of Excel file. If you want to add columns, the process would be:

    Open the file
    Select the sheet (though not strictly necessary)
    Add your three column headers
    Add your static data
    Save and close the file.

    Repeat for each file.

  8. #8
    Registered User
    Join Date
    09-17-2020
    Location
    New York
    MS-Off Ver
    2019
    Posts
    28

    Re: xlsx to xlsm conversion

    I think I might try to record the macro, if not I will code it. But the end goal is to not touch the files at all, I want everything to completely automated.

  9. #9
    Registered User
    Join Date
    09-17-2020
    Location
    New York
    MS-Off Ver
    2019
    Posts
    28

    Re: xlsx to xlsm conversion

    Please Login or Register  to view this content.
    This will convert my xlsx to xlsm

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: xlsx to xlsm conversion

    Fine. But I still don't understand why you believe you need to convert them.

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: xlsx to xlsm conversion

    Why not use the loop in that code to add the columns you mentioned in post #6 to each file in the folder?

+ 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. Saving xlsm to xlsx
    By brentjohn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-21-2019, 08:36 AM
  2. [SOLVED] Save as XLSX from XLSM and then delete the XLSM file?
    By LIL2606 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-29-2019, 08:56 AM
  3. [SOLVED] xlsm Save As xlsx, delete xlsm
    By cjjr82 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2018, 05:15 PM
  4. XLSX or XLSM - which should I use
    By terrypin in forum Excel General
    Replies: 18
    Last Post: 09-08-2016, 01:16 PM
  5. save as xlsm to xlsx
    By stevetothink in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2016, 07:43 PM
  6. Replies: 0
    Last Post: 05-20-2014, 12:01 PM
  7. 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

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