Click here to Skip to main content
13,143,637 members (31,244 online)
Click here to Skip to main content
Articles » Languages » C# » General » Downloads

Stats

128.3K views
4.9K downloads
53 bookmarked
Posted 27 Nov 2007

TblProc: OpenOffice Calc and Excel

, 29 Jan 2009
OpenOffice Calc and Excel
using System;
using System.Collections.Generic;
using System.Text;
using unoidl.com.sun.star.beans;

/********************************************************************************
* Copyright : Alexander Sazonov 2009                                           //
*                                                                              //
* Email : sazon666@mail.ru                                                     //
*         sazon@freemail.ru                                                    // 
*                                                                              //
* This code may be used in any way you desire. This                            //
* file may be redistributed by any means PROVIDING it is                       //
* not sold for profit without the authors written consent, and                 //
* providing that this notice and the authors name is included.                 //
*                                                                              //
* This file is provided 'as is' with no expressed or implied warranty.         //
* The author accepts no liability if it causes any damage to your computer.    //
*                                                                              //
* Expect Bugs.                                                                 //
* Please let me know of any bugs/mods/improvements.                            //
* and I will try to fix/incorporate them into this file.                       //
* thx Amar Chaudhary for disclaimer text ;-)                                   //
* Enjoy!                                                                       //
*                                                                              //
*/
/////////////////////////////////////////////////////////////////////////////////

//Helper class to view XPropertySet contents while debugging :-)

namespace SA.TblProc
{
    //OO enum props
    internal class OOEP
    {
#if DEBUG
        public static object Obj
        {
            set
            {
                XPropertySet xps = value as XPropertySet;
                if (xps == null) return;
                XPropertySetInfo xpsi = xps.getPropertySetInfo();
                if (xpsi == null) return;
                Property[] props = xpsi.getProperties();
                for (int i = 0; i < props.Length; i++)
                {
                    string name = "<error getting value>";
                    object val = null;
                    try
                    {
                        name = props[i].Name;
                        val = xps.getPropertyValue(name).Value;
                    }
                    catch (Exception ex) {}
                }//place break here to view names and values
            }

        }
#else
        public static object Obj {set{}}
#endif
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)

Share

About the Author

Aleksandr Sazonov
Software Developer (Senior)
Russian Federation Russian Federation
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 29 Jan 2009
Article Copyright 2007 by Aleksandr Sazonov
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid