Re: .XLS, not .CSV from NETX?
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Mar 2009 12:31:59 +1300
Paul H wrote:
Thanks, Pete, is this what you had in mind?
http://user.services.openoffice.org/en/forum/viewtopic.php?f=25&p=77541
I'm overwhelmed, but I'll play around with it. At least it's all
COBOL stuff. I'll look up the definitions of the various invoked
commands and go from there. Any clue of where to find a list of
these things?
No, this isn't what I had in mind. I found it overwhelming, too :-)
This is a post from a guy who wants to move OFF Excel to Open Office. He
already has a number of programs using Automation to Excel and is wondering
if there is an API in Open Office that can support the same Classes,
Methods, and Properties. He's looking foir a COM interface to Open Office.
I have no idea whether there is one, but I'd be surprised if it supports the
same method calls as Excel.
Anyway, this is way too difficult a route for you to try if you are not into
OO COBOL (although I admire your courage and attitude... :-))
Fortunately, for what you need to do you only need a template. You can
provide this to the users and tell them to use it when they import your
..CSV.
That will get the job done.
HOWEVER...
If you DO want to get into program control and use COM Automation (which
allows you to connect to and control most of the Office Suite (I'm not sure
about Power Point... never done it), including MS Access and Excel you
should find a list of the properties and methods on MSDN. Of course a very
easy way is to use an Object Browser to look at Excel. You already have one
on your system to support VBA macros... It's a bit hard to explain without
posting screenshots, but try this (Description is for Excel 2007; tabs and
menus may be different in other versions...):
1. Open Excel.
2. Select the "Developer" tab.
3. Click the icon to open Visual Basic. The Visual Basic Editor opens and
displays a toolbar with small icons on it. There should be one that looks
like an open cardboard box with 3 shapes floating over it. This is the
Object Browser. (The toolbar icons have tooltips so floating the mouse over
it should confirm if you have the right icon.) Alternatively try pressing F2
while on the Editor screen., that should open the Object Browser
4. Change the drop down that says <All Libraries> to be Excel. Immediately
you can see all the classes that Excel supports in the left pane, and all
the Methods, Properties and Events for the selected class in the right pane.
Note that properties have a hand holding a page icon, methods have what
looks like a green eraser, and events have a little lightning flash. To get
more information about any one of these, select it, then click the question
mark icon near the top of the screen, or click Help.
I wrote a number of components in Fujitsu COBOL that interfaced to EXCEL and
ACCESS through COM Automation and found it very powerful.The experience
gained was useful because now I do it from C#. The only source of
information I used was the VB Object Browser, as described above.
The number of methods and properties available is indeed overwhelming, but
you'd end up using a tiny subset of them to achieve most purposes.
As the COBOL man in the post you quoted re Open Office said: "I am on my
own".
My experience using COBOL was exactly that. Most of the examples and sample
code are in VB and, increasingly, C#. I taught myself VB so Icould
understand the bloody samples, then translate them back to COBOL... In the
process I acquired a language that is really quite useful, especially for
scripting.
I guess there is an argument that says that all experience is useful in some
(not always immediately obvious) way. I managed to solve a problem of using
drag 'n drop in Fujitsu COBOL and could not have done so if I didn't know
VB...
As my C# confidence increases I am becoming aware of techniques and
approaches I would never have encountered in COBOL.
All of us should continually strive to expand our skill sets if we are
serious about computer programming, never mind having more skills to sell in
the marketplace.
"I only use COBOL... and I try to do everything."
copying Pete's example...
LOL! Imitation is the sincerest form of flattery... :-)
Pete
--
"I used to write COBOL...now I can do anything."
.
- References:
- .XLS, not .CSV from NETX?
- From: Paul H
- Re: .XLS, not .CSV from NETX?
- From: Pete Dashwood
- Re: .XLS, not .CSV from NETX?
- From: Paul H
- .XLS, not .CSV from NETX?
- Prev by Date: Re: XP good until 2014 according to Microsoft
- Next by Date: Re: XP good until 2014 according to Microsoft
- Previous by thread: Re: .XLS, not .CSV from NETX?
- Next by thread: Re: .XLS, not .CSV from NETX?
- Index(es):
Relevant Pages
|