Might I voluntier you are asking for help in how to "pivot" your spreadsheet
into a skinny Access Table? If so...
Do you know VBA? If so, this may help you along.
In this example, table AFlows has the following fields:
IDCase = a Foreign Key to another table that "names the spreadsheet"
IDLineitem = A foreign Key to another table that id's the Row name or
number.
Year = This is my column date. You would use PeriodEndDt.
Value = This is the cell value to store. You would use Amount.
Early in the process, define the workbook.
Open the Database
set dbPW = dao.OpenDatabase(..FilePathSpec..)
Open the Recordset of your Database Table to hold your data
Dim grsAFlows as dao.recordset 'Sorry, I prefer DAO to ADO.
Set grsAFlows = dbPW.OpenRecordset("Select * from AFlows;")
Set the Range of the area to load.
Set grngLFlows = .Names("LFlows").RefersToRange
For each row in the range,
get the idLine from the other table.
Call L40_WriteFlows below, passing the current LineID and Row number of
the range.
Next row in range.
Close all recordsets, close the database.
Sub L40_WriteFlows(idLine As Integer, iRow As Integer)
'for each column in the range grngFlows, on the passed row,
'add a flow row, write the Year, IDLine, and value into the row.
Dim i As Integer
Dim ni As Integer
ni = grngLFlowYear.Columns.Count
'grngFlows is a global variable of the Range to load.
'grsAFlows is a global Open Recordset for Edit.
If idLine > 0 Then
For i = 1 To ni
With grsAFlows
.AddNew
!IDCase = gIDCase
!IDLineitem = idLine
!Year = CSng(grngLFlowYear.Cells(1, i))
!Value = grngLFlows.Cells(iRow, i)
.Update
End With
Next
End If
End Sub
I left out a lot of steps, but if you have never done this before, I hope I
saved you some time.
Use a crosstab query to retrieve data in the familiar format of months as
column headers.
Also, do a VBA help lookup for the method range.CopyFromRecordset.
It plops a query result into a spreadsheet quickly.
You'll like it!