Save BOM in drawing as .xlsx into same folder as drawing

Hello,

the functionality I am trying to reproduce is right clicking on an existing BOM and selective "Save As"

  • I would like the file type to ideally be .xlsx (.txt or .csv could possibly work as well)
  • File to be save into the same folder as the drawing
  • assuming only one BOM and a single sheet but possibly a revision table

I can identify the file location of the current file.

I can't find the BOM and save. the API help doesn't list a save method for BOM Tables but does list a save method for general tables into a .txt files (SaveAsText)

Am I missing something simple or will this take a little more effort with traversing the drawing etc.?

Thanks

SolidworksApi/macros