Mike Thomas <mike_thomas / yahoo.com> wrote in message news:<20020115195743.89807.qmail / web11207.mail.yahoo.com>... > --- Bhagavatheeswaran Mahadevan <BMahadevan / NIIT.com> wrote: > > Hi > > > > The Pragmatic Programmers guide talks about creating charts thru > > Excel..........It says" -4100 is the value for the Excel constant > > xl3DColumn".........How can u get the values for other Excel > > constants..........for creating diff kinds of charts > > Regds > > Suresh > > My Windows skills are a little rusty, but you should be able to get the > constant definitions via the VBA documentation for Excel (the docs that > a VBA/Excel programmer would use). Now, to get the actual values for > the definitions, you'd probably have to write a VBA script (in Excel, > for example) to print out the constants that interest you. You can get the symbolic constant values from WIN32OLE in ruby. Try this: require 'win32ole' module EXCEL_CONST end WIN32OLE.const_load(xls,EXCEL_CONST) #load constants into namespace p EXCEL_CONST.constants #... #usage example ...Get a worksheet and save it as CSV, e.g.... sheet.SaveAs(dest,EXCEL_CONST::XlCSV) #... HTH, PAH