+ Reply to Thread
Results 1 to 3 of 3

How to save file with correct file extension, .xls or .xlsx?

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    22

    How to save file with correct file extension, .xls or .xlsx?

    Hey all,

    Question, how can I save worksheet from existing workbook as a new workbook with extension .xls or .xlsx depending on the version of Excel on which the original was opened and no matter the extension of original?

    my code that I was trying to create all above does not work, because even if I am using Excel 2007, 2010 or 2013 it will still be saving only as .xls.

    Please help

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    02-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    22

    Re: How to save file with correct file extension, .xls or .xlsx?

    Ok I have managed to change the code a bit and works, but now it saves the new template in Compatibility Mode in Excel 2007, 2010 and 2013.

    What should I do?

    Here is my new code
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    USA
    MS-Off Ver
    Excel 2000
    Posts
    17

    Re: How to save file with correct file extension, .xls or .xlsx?

    I don't know what's going wrong off the top of my head, but have you looked at GetSaveAsFilename and SaveAs method documentation as regards the FileFilter param and FileFormat param?

    I forget which ones are for which Method.

+ 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. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  2. [SOLVED] Save xlsm file as xlsx file
    By ccpsc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2012, 01:12 AM
  3. Changing an Excel file extension from .xls to .xlsx
    By AliJay in forum Excel General
    Replies: 4
    Last Post: 02-10-2012, 09:22 AM
  4. Save workbook with multiple sheets as csv file and xlsx file
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2010, 02:41 PM
  5. [SOLVED] Additional file with no extension created during File Save As proc
    By Peter Rooney in forum Excel General
    Replies: 2
    Last Post: 08-11-2005, 10:05 AM

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