Hacker News new | ask | show | jobs
by alex-nikitin 1806 days ago
I used xlwings in a variety of settings over the years, and it was my go-to when building the first two prototypes of our Excel commodity price sync functionality. We hit a performance wall pretty quickly due to the nature of our use case so we moved to Excel's C API and built our own add-in. This move took a lot of effort to get right, the C API has a tendency to punish you hard (crash Excel) for the smallest of transgressions. xlwings allowed us to prove the concept pretty quickly and without fear of crashing Excel before committing to C.

Don't mean for this to sound like a testimonial for xlwings (I guess, it kinda is) - it's been very useful for us so I had to share! It's a great library, has great documentation, and I can't recommend it enough. However, if you're after low latency* for real-time interactions across a large dataset, you'll need to look elsewhere, or roll your own.

* under 2 second response; you're dealing with Excel after all!

Shameless plug for our product: https://www.thectgrid.com/

2 comments

I guess with your tool collaboration with a few people across one excel sheet would work more smoothly than with an Excel file on OneDrive?

We work in a team of only 3 people with an excel file on OneDrive and what annoys me the most is that it happens quite often that excel "says" that your changes have been saved (e.g. it says it's saved in the header, also the blue onedrive symbol shows no circle. The best indicator is the file in the explorer: If that shows the green checkmark then it's good) while in reality it's not and you only get a notification (that it cannot save because it cannot updates from someone else with yours) when you try to close the file. Annoying. Anyone with solutions is very welcome :)

Absolutely, the people using us seem think so! We target a niche: real time sharing of commodity pricing. The linked data can live in different files and layouts, can be updated via web or mobile, and full change history is stored as well.

We explored a few options when trying to solve the sharing problem, including OneDrive, Google Sheets, and some 3rd parties. Couldn’t find anything that fit the bill.

FWIW- What you describe could be down to OneDrive’s data quotas. If you’re dealing with pricing data or any numerical data then CT Grid solves that issue. Even if it’s not a perfect fit, I’d be happy to share the experience if it helps you.

PyXLL (www.pyxll.com) is written using the Excel C API and that’s partly how it achieves its excellent performance. It’s not free software, but it ‘properly’ integrates Python into the Excel process so doesn’t suffer from the performance problems of interacting with Excel from a separate process via COM and VBA.
What about in-process COM? Is that still too slow compared to the C API, or does it have other issues?