• Welcome to PlanetSquires Forums.
 

Creating Excel WorkBooks without Automation

Started by Paul Squires, October 15, 2012, 10:50:42 PM

Previous topic - Next topic

Petrus Vorster

The FB version works like a charm.

Well done Paul!

Ps: How do one do a Shellexecute in FB?
Shell is slow and shows a DOs window, so that cannot be right.

This is perfect for my needs. Thank you.

-Peter
-Regards
Peter

Paul Squires

Quote from: Petrus Vorster on November 13, 2023, 09:25:33 AMPs: How do one do a Shellexecute in FB?

Maybe something like this?

   dim ShExecInfo     As SHELLEXECUTEINFOW 
   dim wszCommand     As CWSTR
   dim wszParameters  As CWSTR

   With ShExecInfo
      .cbSize       = Len(SHELLEXECUTEINFOW)
      .fMask        = SEE_MASK_NOCLOSEPROCESS
      .HWnd         = 0
      .lpVerb       = Null
      .lpFile       = wszCommand
      .lpParameters = wszParameters  
      .lpDirectory  = 0
      .nShow        = SW_SHOWNORMAL
      .hInstApp     = 0
   End With

   ShellExecuteEx(@ShExecInfo)

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Petrus Vorster

#47
Hi Paul

That works pretty well, and it opens the file-open dialogue.

After some struggles, I came up with this :
shellexecute (NULL,"Open","TEST.XML",0,0,1)

This opens the file immediately in Excel, but I was hoping you could take a look and tell me if this is correct or is there a better way to do this?

-Thank you

Peter
-Regards
Peter