ACC: TransferSpreadsheet Action Does Not Add File Extension

Last reviewed: May 14, 1997
Article ID: Q96891
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

The TransferSpreadsheet action requires a file type and file name to export data to a spreadsheet. The file name tells Microsoft Access what to name the spreadsheet file that will hold the exported data. If you do not specify an extension in this file name, Microsoft Access will not add the appropriate extension for the file format to which you are exporting.

RESOLUTION

By not automatically writing a file extension, you are able to specify any extension you like (for example, .EXE, .DAT, and .INI).

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access versions 1.x and 2.0. This problem no longer occurs in Microsoft Access for Windows 95 version 7.0. In Microsoft Access 7.0, when you choose a specific file type, Microsoft Access automatically adds the file extension for you.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a table called Table1 and add some fields and example data.

  2. Create the following macro:

          Macro Name      Action
          -----------------------------------
          Transfer It     TransferSpreadsheet
    
          Transfer It Actions
          ------------------------------------
          TransferSpreadsheet
             Transfer Type: Export
             Spreadsheet Type: Microsoft Excel
             Table Name: Table1
             File Name: TestIt
             Has Field Names: No
    
    

  3. Run the macro.

A Microsoft Excel spreadsheet file will be created in the current directory and the file will be called TESTIT, not TESTIT.XLS.

REFERENCES

Microsoft Access "User's Guide", version 2.0, page 191

Microsoft Access "Language Reference," version 1.0, pages 476-479


Additional query words: worksheet .xls .wks .wk1 .wk3
Keywords : kbusage McrArg
Version : 1.0 1.1 2.0
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 14, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.