Author Topic: .net Excel w/ CAD Advice  (Read 6623 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: .net Excel w/ CAD Advice
« Reply #15 on: June 25, 2018, 09:14:00 AM »
If this project is internal to your company, and have control over what's installed, I would use the Microsoft Excel Object Library.
Excel & late binding works well too if your looking for generic automation.
Lots of examples out there for connecting to excel from .NET. With this method, you can take advantage of Excel's Named Ranges & formulas 

cheers :)


MickD

  • King Gator
  • Posts: 3636
  • (x-in)->[process]->(y-out) ... simples!
Re: .net Excel w/ CAD Advice
« Reply #16 on: June 25, 2018, 04:42:35 PM »
Mick I'm with you. For something so simple I don't want to bloat my application with a library. You could simplify even more though.

Code - C#: [Select]
  1. return File.ReadAllLines(filename).Select(l => l.Split(',')).ToList();

Nice one MC. I like LINQ but I haven't got around using it much yet as I still think in a procedural fashion :)
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Jeff H

  • Needs a day job
  • Posts: 6150
Re: .net Excel w/ CAD Advice
« Reply #17 on: June 25, 2018, 06:06:02 PM »
LINQ is the shiznatch!