I create some data from SAP-BI server and it send me an Excel-2013 file, I then import this excelfile into Access-2013 for further processing.
I located the string in VBA code which import the data, it looks like this:
DoCmd.TransferSpreadsheet acImport, , "Ttable", fileName, True, "abclist$"
The table in access is named Ttable The excel spreadsheet is named abclist
So far the current process has been working good. However lately the amount of data have increased to more than 1.04 million raws (which seems to be the max number of raws excel can handle in one spreadsheet) and SAP-BI is then exporting the remaining data in a second spreadsheet which is named abclist(1)
How do I change the VBA code to dynamically allow both spreadsheets if there are two spreadsheets, and it will continue to work if there is only one spreadsheet in the excelfile?