Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Combining Excel Parser with Google Scholar Scraper

by Nkuvu (Priest)
on Apr 14, 2009 at 18:41 UTC ( #757458=note: print w/replies, xml ) Need Help??


in reply to Combining Excel Parser with Google Scholar Scraper

One thing I'm seeing in your Excel-handling Perl is that you never write to the spreadsheet, nor do you save the Excel file. When using Win32::OLE, opening a file opens it for read/write, so you don't have to do anything differently there. The other thing I'm not sure about is your inner foreach loop -- why is it there at all if you only have one column? Not wrong per se, just curious.

Saving to Excel is really simple. Using kennethk's code (in this node), just add one line (with some surrounding lines to show location):

if ($citedby){ print "\"$title\"\nCited by: $citedby\n\n"; # Assuming you want to save the "cited" info in the # column just to the right of the current cell, adjust # as desired. $Sheet->Cells($row,$col+1)->{Value} = $cited; }

Then, of course, you'll want to call $Book->Save(); before you close the workbook.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://757458]
help
Chatterbox?
[zentara]: LanX One day, I will see a great interest in Tk. It's small, self-contained, needs very few external libraries, AND makes it easy to make high-contrast displays. :-)
[zentara]: Corion in this cased they left the www. out
[zentara]: /d// :-)
[LanX]: i like tk, just joking. but what about modern styles?
LanX has to run. .. o/
[zentara]: modern styles are secondary to display readability. Tk is automatically good at the clunky industrial theme. :-)
[ww]: Amen!

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2017-05-26 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?