Hi, I’m trying to make my life easier and I’d like to automate some database fetching to my BOMs.
I keep my parts database in an external Spreadsheet, and these are identified by some UID field.
This UID is used across my KiCad’s designs. So the task is to add some VLOOKUP to fetch this data from my database.
Up to now, I did it manually each time I was exporting documentation. But I’d prefer to automate this task.
I’m using KiBom for my BOMs exports, due to it’s flexibility and some support for assembly Variants.
What I’m missing is the ability to inject my VLOOKUP formulas directly into exported BOMs. I’d prefer to do it with KiBom itself, and my question is: is there any easy way to get it done, other than messing with KiBom’s code? Or you have already some solutions to my problem?
Maybe KiCad 8’s Database library system could help me after migrating all my existing data to some DB format?
It can probably be done by postprocessing. Read in the spreadsheet, use the key field to look up the database, add a field, and in the end spit out a new spreadsheet.
Short of rolling up your Python sleeves, you could ingratiate yourself with a programmer to help you. Sorry, I’m only a porgrammer (a lysdexic programmer )
If it’s a fairly standard process, the simplest way I’d do it is with powershell, and import-excel
Although I’m not a programmer, I did few pieces of software myself mainly C# and Swift. Python does not look too scary, and I think hacking the xlsx_writer.py module will be the fastest approach (but also the “wrong” one).
I though that maybe there is some “hidden” function that I’ve missed; or there’s a completely different approach that is commonly used for the purpose of database information fetching.
… actually, single-line patch of the xlsx_writer.py solves my problem. A bit of escaping needed to reference my db file, but finally got it running.