Extracting Bill of Materials

I'm looking for an API program that will extract specifc columns of Bill of Materials on a drawing to a CSV file. If someone could point me in the right direction with a simular program it would be greatly appreciated. Thank you

SolidworksApi macros