Open the downloaded Excel file.
1. For each sheet, delete rows 1 & 2 (or all rows up until the column titles.
2. If necessary elete the row that contains the Grand Total.
3. Truncate MySQL table: aa_fl_mu_afrimport.
4. Import each Excel tab into: aa_fl_mu_afrimport.
5. Update the ImpMunID field with the MunID of the Local Unit: UPDATE tmpfloridaafr JOIN m_municipalities ON `Entity ID` = MunLocalCode SET ImpMunID = MunID WHERE MunModID = 1 AND MunState = 'FL'.
6. Update the ImpAndID field with the primary key of the year being imported: UPDATE tmpfloridaafr JOIN m_annualdata ON AndMunID = ImpMunID SET ImpAndID = AndID WHERE AndYear = 2014 AND AndScenario = 'Baseline'.
7. Update the ImpSection field with either Revenues or Expenditures to identify which section is being processed: UPDATE tmpfloridaafr SET ImpSection = 'Revenues'.
8. Update the Account Code to add ‘.’ where it does not exist: UPDATE tmpfloridaafr SET `Account Code` = CONCAT(LEFT(`Account Code`,3), '.',RIGHT(`Account Code`,3)) WHERE locate('.',`Account Code`) = 0.
9. Update the ImpSscID: UPDATE tmpfloridaafr JOIN m_finsubcategories ON SscLineNumber = `Account Code` JOIN m_fincategories ON SucID = SscSucID SET ImpSscID = SscID WHERE SucModID = 1 AND SscState = 'FL' AND SucSection = 'Revenues'
Loop through each fund column and insert the amounts