title: Excel VBA open source library and API for handling and cleaning complex CSV file content?
body: <p>Does anyone know where there is an open source API and library specifically for manipulating and cleaning tabular data with complex formatting within Excel worksheets and workbooks?  </p>
  
  <p>I am building an application for parsing, rearranging, and extracting content from Excel CSV files exported from scientific and financial applications.  The goal is to import the cleaned and "normalized" CSV files into SQL Server or Oracle databases, or other Excel applications.  Excel's SQL query tools don't deal with the irregular data very well, since source tables in the CSV tables are not "normalized" and the sizes, shapes, and content be very irregular or sparse.  </p>
  
  <p>There can be as many as 10-15 table "regions" or sections within a single CSV file or Excel worksheet.  Many rows are blank, some cell contents must be parsed and split into new columns.  There are other issues with the data.  </p>
  
  <p>An Excel VBA library and API focused on Tables, Rows, and Columns operations, would be helpful.  Something with operations for named tables, and Regions (sections), Row and Columns, e.g., find, move, copy, paste, add, and delete columns and rows by their header names.  </p>
  
  <p>Then for Tables or Table Objects, to add Index columns, Sort the table, Select, Copy and Move to other worksheets or Sections, Delete, etc.  </p>
  
  <p>It is taking a while to build it myself because of the quirks of VBA programming.  I looked at C# libraries for handling CSV files, but they don't focus on Tables, Rows, Columns, and Worksheet operations for cleaning up and reformatting data.  Most answers I've found here and in Excel web forums deal with entire CSV files, Excel workbooks, or worksheets, but not worksheets with many irregular tables with different row and column lengths in one worksheet.  I don't want to reinvent a wheel (libary) that's been built thousands of times before.  </p>
  
  <p>There are C# libraries, but I want something in Excel VBA.  </p>