How to change the excel file format .xlsm to .xlsx

dear all,

I have some excel files, these files format are .xlsm file(Macro file). I want to change these file format to .xlsx file , anybody could help me? or give me some demo code . thanks a lot in advance.

Hi @chrisjiyiwei :wave:

Check this:

This also works:

Path.ChangeExtension("YourFile.xlsx", ".xlsm")

thanks a lot for your reply. in fact , it is useless . because the excel file is broken,

What happened? Did it not work?

yes, it does not work . the excel files are broken.

Can you share your .xaml file so I can see what’s gone wrong?

convert XLSM files to XLSX online**

  1. Upload XLSM - file . Click "Choose File " button to select a xlsm file on your computer. XLSM file size can be up to 50 Mb.
  2. Convert XLSM to XLSX . Click " Convert " button to start conversion.
  3. Download your XLSX . When the conversion process is complete, you can download the XLSX file
    Hope this will help
    Best Regards

Dear @chrisjiyiwei ,

PFA the sample workflow as per request β†’ xlsm to xlsx.xaml (4.6 KB)

What I have done is β†’ Just used a β€œRead Range” activity to read the β€œxlsm” file and converted it into a data table. Then I used a β€œWrite Range” activity and induced the created data table to it. And make sure to add the extension to the filename as β€œ.xlsx”

Mark as solution if it helps so that we can close the topic.

Best Regards,
Sathanand :slight_smile: