Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Last cell?

by cacharbe (Curate)
on Jan 28, 2003 at 19:38 UTC ( #230706=note: print w/ replies, xml ) Need Help??


in reply to Last cell?
in thread Using Win32::OLE and Excel - Tips and Tricks

Upon further investigation, I have found that this is not reliable if the columnar data is not of equal row size. It returns the last row of the right most column, which is incorrect in some cases.

The methods I used in the examples return the last row (over all) and the last column (over all) vs finding the location of the last cell in the last column

So, if the data on the worksheet is symmetric, your function works faster, however yours would not be reliable to, say, put edges around all the cells in a data set that has columns of different row sizes

C-.

---
Flex the Geek


Comment on Re: Last cell?
Re: Re: Last cell?
by Nkuvu (Priest) on Mar 04, 2003 at 23:01 UTC

    Interesting. I don't seem to have run into this, but I wasn't explicitly looking for it, either. I'll have to do some more research on the matter.

last row/column
by Foggy Bottoms (Monk) on Jun 18, 2003 at 09:35 UTC
    If the method you'd come up originally doesn't work fine with non "square" sheets then what would you recommend.
    Furthermore, I can't seem to be able to make your original last row/column script work. The dos prompt tells me the following :
    Bareword "xlPrevious" not allowed while "strict subs" in use at D:\sou +rce\readExcel.pm line 30. Bareword "xlByRows" not allowed while "strict subs" in use at D:\sourc +e\readExcel.pm line 30. Bareword "xlPrevious" not allowed while "strict subs" in use at D:\sou +rce\readExcel.pm line 33. Bareword "xlByColumns" not allowed while "strict subs" in use at D:\so +urce\readExcel.pm line 33.
    What should I do ?

    edit (broquaint): changed <pre> to <code> tags

last row/column
by Foggy Bottoms (Monk) on Jun 18, 2003 at 09:37 UTC
    Sorry about the previous post - I found out what wasn't working about the xlPrevious and I included the
    use Win32::OLE::Const 'Microsoft Excel';
    line. Thanks again and great tutorial. How about PowerPoint someday ?

      That's actaully in the works. It's a little more hairy than Excel (which is actually the easiest of the Office suites, aside from maybe Outlook). I will probably post a MSWord and Powerpoint both over the next few months.

      I haven't had to do create a powerpoint specific project yet, so most of what I have is just snippets, but I've cranked out a couple of word related projects, and I'm trying to distill them down into a workable tutorial.

      Stay tuned.

      C-.

      ---
      Flex the Geek

        Let me know - I'm pretty interested because I've been working on OLE since the beginning of June and I'm starting to get the hang of it. I've explored PowerPoint a little but rather unsuccesfully (hence my question). As for Word, I thought it was pretty easy.
        Perhaps we can work together on some sort of OLE tips page. I'd be glad to share what I've learned so far.
        See you round...

        Sunt qui sciant

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://230706]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2014-08-01 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (10 votes), past polls