Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

In replying to a (nearly) 4-yr old node, your question is in danger of flying beneath everyone's radar. Better to post under Seekers of Perl Wisdom. To get an idea of how this site works, I recommend looking at the "Welcome to the Monastery" section of the Tutorials page.

Super Search is also quite helpful. Creative use would turn up nodes like Index of Spreadsheet FAQs.

ActiveState has an article that shows How to convert a VBA macro to Perl. An offsite reference that may help too is The Spreadsheet Page with its extensive Excel FAQs.

You may also have on your machine something called "OLE Browser" or "Type Library Browser" if you installed Win32-OLE-0.1403 or upgraded from that to a later version. You might find it in C:\Perl\html\OLE-Browser or C:\Perl\html\lib\site\Win32\OLE depending on your install.

Something else I've found to be very handy indeed is West Wind Technology's GetConstants utility, which allows you to look at all those cryptic constants MS Office uses. Note that they do shuffle the links around occasionally, so it may be necessary to do some searching.

Ok, more to the point... The command you are looking for is (in VBA):

Dim Book as Workbook Book.Save

or, perhaps,

Book.SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnly +Recommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, +TextCodepage, TextVisualLayout, Local)

You should now have all the information necessary to tweak this as needed. :-)

Update: You might also wish to investigate the GetSaveAsFilename function...

planetscape

In reply to Re^4: Using Win32::OLE and Excel - Tips and Tricks by planetscape
in thread Using Win32::OLE and Excel - Tips and Tricks by cacharbe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2024-03-28 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found