← Back to team overview

kicad-developers team mailing list archive

Re: XSL Script to convert BOM XML File to CSV

 

On 04/15/2013 06:11 PM, Stefan Helmert wrote:
> Hello,
> 
> the internal BOM generator has too much bugs. I had to use the python plugins, but they are generating only incompatible XML Files or CSV Files without the user defined entries.
> 
> Now I designed a XSL script, which converts the generated XML Partlist in a CSV file for Libre Office or Open Office. It is very easy to use. You can specify it as a plugin for KiCad
> 
> It searches for all field names. Generates the table head out of this names and assignes the table entries.
> 
> Here you can have the script. It would be a pleasure for me to find the file in the next KiCad version in the pluigns directory.
> 
> Best regards
> 
> Stefan Helmert


Stephan,

This is nice work.  You may find yourself being our resident xslt expert.  :)

I use gnumeric spreadsheat.  I get trailing semicolons when importing the BOM CSV.

Can you test the attached version which works better for me.  It also removes the spaces
after the commas, but that is not as important as the trailing ; which seems like a bug to me.

This is one I would commit under your name.

Dick


P.S.

The python BOM generators will still be useful as they get debugged and enhanced.  We can
offer a number of ways to generate a BOM.  In the end, I suspect the python scripts will
be better than anything we can do in xsl.  However for now, yours is the best option and
seems to work better than the internal C++ one.




Attachment: bom2csv.xsl
Description: application/xslt


References