Selasa, 16 Maret 2021

Re: [MSAccessProfessionals] Transfer Spreadsheet code

here is the link i found the info on

Jim Wagner


On Tuesday, March 16, 2021, 3:50:35 PM MST, Jim Wagner <josephwagner2@outlook.com> wrote:


Hello all,

I have been using the following line of code to transfer spreadsheets into the database. 
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel5, "Student Positions", "W:\DATA MANAGEMENT SERVICES\MASTER PEOPLESOFT TABLES\Student Positions.xls", True, ""

We are now needing to use xlsx format instead of xls. In the beginning access did not transfer xlsx so it was easy to use the older format. but we are using new software to download our data and xls is not available. I found the following to change to the new format but I wanted to confirm that i am using the correct one

acSpreadsheetTypeExcel12Xml 10 Microsoft Excel 2010/2013/2016 XML format (.xlsx, .xlsm, .xlsb)
So my code would now be 
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12xlsx, "Student Positions", "W:\DATA MANAGEMENT SERVICES\MASTER PEOPLESOFT TABLES\Student Positions.xlsx", True, ""

or do i use the following because we have office 365 Excel 2019
acSpreadsheetTypeExcel12 9 Microsoft Excel 2010 format

thank you so much for the help
Jim Wagner

Tidak ada komentar:

Posting Komentar