Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9100583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:54:12+00:00 2026-06-17T00:54:12+00:00

I need to convert some xls files into xlsx files. I can successfully convert

  • 0

I need to convert some xls files into xlsx files. I can successfully convert one xls file into xlsx by running this command into cmd prompt (windows):

ssconvert inputFileName.xls outputFileName.xlsx

(ssconvert is a Gnumeric’s command-line utility that can convert between different spreadsheet file formats)

I’d like to write a batch file that FOR EACH file in a specified directory runs the command I wrote above, using the current file name both for input and for output filename.

For example, if I have this set of files:

c:\directory\file1.xls
c:\directory\file2.xls
c:\directory\file3.xls

the output should be

c:\directory\file1.xlsx
c:\directory\file2.xlsx
c:\directory\file3.xlsx

so the batch pseudo code should be something like

directory = c:\directory\
for (fileName in directory)
    ssconvert fileName.xls fileName.xlsx

Can anyone help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:54:14+00:00Added an answer on June 17, 2026 at 12:54 am
    for /r %%v in (*.xls) do ssconvert "%%v" "%%vx"
    

    a couple have people have asked me to explain this, so:

    Part 1: for /r %%v in (*.xls)

    This part returns an array of files in the current directory that have the xls extension. The %% may look a little curious. This is basically the special % character from command line as used in %PATH% or %TEMP%. To use it in a batch file we need to escape it like so: %%PATH%% or %%TEMP%%. In this case we are simply escaping the temporary variable v, which will hold our array of filenames.

    We are using the /r switch to search for files recursively, so any matching files in child folders will also be located.

    Part 2: do ssconvert "%%v" "%%vx"

    This second part is what will get executed once per matching filename, so if the following files were present in the current folder:

    c:\temp\mySheet.xls,
    c:\temp\mySheet_yesterday.xls,
    c:\temp\mySheet_20160902.xls

    the following commands would be executed:

    ssconvert "c:\temp\mySheet.xls" "c:\temp\mySheet.xlsx"
    ssconvert "c:\temp\mySheet_yesterday.xls" "c:\temp\mySheet_yesterday.xlsx"
    ssconvert "c:\temp\mySheet_20160902.xls" "c:\temp\mySheet_20160902.xlsx"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to convert some images to base64 for embedding into my CSS... anyone
So, I am trying to convert some xls files to a csv, and everything
I need to convert some hi res audio files to u-law compression. I find
I would need some file encoding conversion tool, to convert some of my source
I need to give one client the ability to convert some videos to f4v
I have an interesting question today. I need to convert some pokemon audio files
Need to convert some XML I'm receiving into HTML quickly. Do I need to
I need to convert some files to PDF and then attach them to an
Say I convert some seconds into the TimeSpan object like this: Dim sec =
I need to convert relative image path (inside some css files) to absolute on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.