+ Reply to Thread
Results 1 to 2 of 2

Save file in different format via VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    05-26-2010
    Location
    South Africa
    MS-Off Ver
    Office 2007
    Posts
    5

    Save file in different format via VBA

    Good day

    I have a spreadsheet where I import data from a closed file (also spreadsheet).
    The import will only work if the file is in a recognised excel format (.xls/.xlsx/.xlsm/etc), problem is that the file to be imported is a report downloaded from a webpage page and is by default in an singleSheet html format but has a .xls extension.

    Is it possible to save the file as a proper .xls file in VBA before I do the import?

    Any help is much appreciated.

  2. #2
    Registered User
    Join Date
    05-26-2010
    Location
    South Africa
    MS-Off Ver
    Office 2007
    Posts
    5

    Re: Save file in different format via VBA

    Ok some more detail. (or just trying to explain it better)

    I have one spreadsheet (dynamic.xls) which imports data from another (static.xls).
    However the static.xls is downloaded from our company website and isnt an excel workbook, it is saved as an excel 97-2003 worksheet.

    For some reason my import macro returns an error because of this. So for time being I have been saving re-saving static.xls as an excel workbook after I download it.

    So what I would like to do is:
    1. Before my import macro starts (with the click event) I want to be able to check what format the selected file is saved as?
    2. If it is in the incorrect format, then I want to save in the correct format.

    Now I already know how to save it in another format, its the checking what the current format is thats the problem.

    Any help with this would be greatly appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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