Results 1 to 9 of 9

Converting 2003 file 2007 on the fly

Threaded View

  1. #1
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Converting 2003 file 2007 on the fly

    Hi all, I've actually got a proper coding question, for a change.

    I'm using a data handling application which exports data to Excel, producing an Excel 2003 worksheet. Unfortunately this means that it gives an error if you try to export more than 256 columns of data (which I do every so often).

    I've found a way to make the other appliction split the columns over multiple Excel sheets and I have a macro which merges all of the individual sheets back onto the front sheet.

    However, before I can run my macro I need to:

    1. Save the exported workbook as an Excel 2007 xlsx file.
    2. Close the workbook
    3. Re-open the xlsx file.

    If I don't do this then my macro fails when the front sheet column count reaches 256.

    So, what I'm wondering is:

    1. Is there a programmatic way to tell Excel that it's no longer dealing with a 2003 format file and it can safely add columns above 256 or

    2. Is there a way to tell if the target workbook is a 2003 file which has just been saved as a 2007 file (in which case my macro can close and re-open it) or if it is a genuine 2007 xlsx file?

    Any advice greatly appreciated.

    Andrew
    Last edited by Andrew-R; 08-26-2010 at 09:09 AM.

Thread Information

Users Browsing this Thread

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

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