Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel twapi add worksheet

66 views
Skip to first unread message

Robert Lipman

unread,
May 15, 2017, 6:52:41 PM5/15/17
to
Hi,

I'm switching my program from tcom to twapi to interact with Excel. I have this line with tcom that I can't figure out the twapi equivalent.

$worksheets Add [::tcom::na] $sheetLast

which adds a worksheet after the last one.

How can I do this with twapi?

Thanks,

Bob

Olivier

unread,
May 16, 2017, 5:29:12 PM5/16/17
to
Have a look at the excellent CAWT extension ( http://www.posoft.de/html/extCawt.html ) and AddWorksheet command ( http://www.posoft.de/download/extensions/Cawt/CawtReference.html#::Excel::AddWorksheet ) .

Olivier.

Robert Lipman

unread,
May 17, 2017, 5:01:07 PM5/17/17
to
Thanks. I used the AddWorkseet example from Cawt, but had to upgrade to twapi 4.1.27 from the older twapi 3.0.32 that I was already using.

Bob

Mike Griffiths

unread,
May 17, 2017, 5:01:35 PM5/17/17
to
I have recently built an application using CAWT and heartily second this suggestion. (CAWT uses TWAPI itself.)

Robert Lipman

unread,
May 17, 2017, 5:06:49 PM5/17/17
to
I built my application long ago (maybe before CAWT) and it would take a lot of work to rewrite for CAWT. I use CAWT as a reference to implement new functionality that I can't figure out.

Bob
0 new messages