ACC: TransferSpreadsheet Action Does Not Add File Extension

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
Issue type : kbbug


Last Reviewed: March 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.