I NO LONGER HAVE EXCEL AND CANNOT UPDATE OR MAINTAIN THE LIBRARY. I WAS ALSO WORKING ON SOME UPDATES BEFORE I LOST ACCESS TO EXCEL BUT NEVER GOT TO FINISH. So here is the potentially broke, sloppy stuff that was in the middle of an update (could try an old backup version, though) : http://www.autohotke...idbit/Excel.zip
We get a lot of COM question, especially Excel. So I decided to brave the depths of MSDN and make a simple to use Excel library. I haven't used COM before so this was a learning experience too. That also means it is possible that my code may not be the best. I also tried to make the code easy to read (with a few ternaries thrown in ).
I would also appreciate it if anyone would like to help expand or optimize my library. Things such as: Word_, IE_, PowerPoint_, or even common Explorer stuff. But remember, KISS. So easy a doorknob could do it.
Note: I only have MS Office 2002 and have encountered a few limitations while testing. Basically, if a Constants value is negative, you need Excel 2007 (possibly even 2003) or higher to use the option. eg. u4 | xlUnderlineStyleNone | -4142 | No underlining. in Excel_Font().
Excel_Get([_WinTitle]) Excel_ActiveCell(_ID) Excel_GetActiveRow(_ID) Excel_GetActiveColumn(_ID) Excel_GetActiveText(_ID) Excel_GetSelection(_ID) Excel_GetValue(_ID [, _start]) Excel_GetRowHeight(_ID [, _start, _end]) Excel_GetColWidth(_ID [, _start, _end]) Excel_AutoFill(_ID [, _start, _end, _Sources, _type]) Excel_SetRowHeight(_ID [, _start, _end, _value]) Excel_SetColWidth(_ID [, _start, _end, _value]) Excel_SetValue(_ID [, _start, _end, _value]) Excel_SetStyle(_ID [, _start, _end, _style]) Excel_Select(_ID [, _start, _end]) Excel_SetActive(_ID [, _start]) Excel_SetFormula(_ID [, _start, _end, _value]) Excel_ScreenUpdate(_ID) Excel_SplitPanes(_ID) Excel_SetSplit(_ID [, _which, _where) Excel_DelCells(_ID [, _start, _end, _direction]) Excel_ClearText(_ID [, _start, _end]) Excel_ClearAll(_ID [, _start, _end]) Excel_ClearFormatting(_ID [, _start, _end]) Excel_BgColor(_ID [, _start, _end, _color]) Excel_Font(_ID [,_start, _end, _options, _Font]) Excel_Borders(_ID [, _start, _end, _options])
Log: 5. Update: --- Dead --- 4. Update: Sun April 24, 2011 - Excel_SetSplit - Excel_SplitPanes - Excel_ScreenUpdate - Excel_GetSelection - Preparing the Docs for Natural Docs 3. Update: Fri April 08, 2011 - Excel_AutoFill() - Excel_SetStyle() - vertical align - More Documentation - Basic samples in the Docs - fixed some mistakes 2. Update: Wed April 06, 2011 - added jethrows Excel_Get() - Changed Excel_ActiveCell and Excel_GetActiveCol - Fixed a couple errors. - GetText and SetText renamed. - Todo List updated. [color=darkred]1. Initial release: Tue April 05, 2011