Jump to content
Developer Wiki and Function Reference Links ×

SetWSCellFormulaN - really necessary creating a new worksheet?


Recommended Posts

Is it really necessary, to create a new worksheet, everytime I run the script again?

 

a) or can I "assign the worksheet to the handle in another way, too? (still looking for the way)

 

b) is there any way, to check, wether a worksheet of a specific name already exists in the file?

 

worksheet := CreateWS('Wohnungstypen-Auto', 5, 2);

 

SetWSCellFormulaN(worksheet, zeile, 1, zeile, 1, inString);

Edited by matteoluigi
Link to comment

Hi @matteoluigi ,

   You can get the handle to any named object using GetObject() like this:

 

    H := GetObject('Wohnungstypen-Auto');
    if (H <> nil) & (GetTypeN(H) = 18) then begin    { type 18 = Worksheet }

       { do worksheet stuff here }
    end;        { if }

 

   It is always wise to check a handle's validity and type before using it.

 

HTH,

Raymond

 

 

  • Like 2
Link to comment

Worksheets are just like any other VW object and can be accessed a number of different ways.

 

As Raymond says, Naming the worksheet might be the easiest way.

 

But you could also use criteria to get a handle to the Worksheet Image on the drawing and then use that to get the handle to the actual worksheet so you can edit it.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...