Working with Excel

User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Working with Excel

Post by nageswaragunupudi »

Gale FORd wrote:I learn a lot by recording macros and looking at the code.

1. Start recording macro
2. Do the steps in Excel that you want to perform.
3. Stop recording
4. Look at the code to see what Excel did to accomplish the task
This is the best way.
Regards

G. N. Rao.
Hyderabad, India
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Working with Excel

Post by ukoenig »

I started with the Excel-Tool.

Macros are good, to find out a Syntax, but I don't want to start a macro every time
I'm looking for a Solution.

I still would like to have a Solution, the User can define a Macro, using a Multiline-get.
I don't know if it is possible, to run it after :
TOleAuto():New( "Excel.Application" )

What is included :
Editor for : oWin, oExcel, oWorkbook and oSheet.
Includes a Syntax-Field and a Memo-Field.

A Painter, to define Fonts, Colors and some more Settings.
Writing the Source, or start a Preview of a Excel-Sheet with the defined settings

Image

Editor for oWin + Global-Informations, oExcel, oWorkbook and oSheet.

Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Working with Excel

Post by TimStone »

Your example screens look like the tool would be very helpful.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
SteveLai
Posts: 11
Joined: Tue Apr 18, 2006 11:43 am
Location: Scotland
Contact:

Re: Working with Excel

Post by SteveLai »

Is it possible to have more than one sheet in the workbook?
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Working with Excel

Post by Jeff Barnes »

You might also find this link useful ... it has a list of all the excel constants:

http://www.smarterdimensions.com/blog/?p=374


Another site I've used for help in the past:

http://www.excelforum.com/

or:

http://www.mrexcel.com/
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Re: Working with Excel

Post by Jeff Barnes »

Yes you can have more than one sheet:

oExcel:Sheets(cSheet):Select()


Take a look here for a cheat sheet I made some time ago:

http://www.fivewin.info/html/tips___tri ... .php?id=46
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
SteveLai
Posts: 11
Joined: Tue Apr 18, 2006 11:43 am
Location: Scotland
Contact:

Re: Working with Excel

Post by SteveLai »

Very helpful links with good examples Jeff ... many thanks!

I ended up using the following statements ...

oExcel:Worksheets(n):Activate() // where n = 1, 2, 3 ... etc
oSheet := oExcel:Get("ActiveSheet")

oSheet:name is useful for verifying which "n" is being used.
Post Reply